Complex (function): Difference between revisions

Jump to navigation Jump to search
m
(Created page with "{{Built-in|Complex|⌾}} is a dyadic scalar function which combines its arguments into a complex number having with the left argument as real part and the right ar...")
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Built-in|Complex|⌾}} is a [[dyadic]] [[scalar function]] which combines its arguments into a [[complex number]] having with the left argument as real part and the right argument as imaginary part. It was added to [[J]] as <source lang=j inline>j.</source> together with initial support for complex numbers, and was adopted in [[Extended Dyalog APL]] using the [[glyph]] <source lang=apl inline>⌾</source> because it was seen as a type of numerical [[Compose|composition]] (<source lang=apl inline>∘</source>) for the [[Circle|circular]] (<source lang=apl inline>○</source>) domain. Complex shares its glyph with [[Imaginary]] which is equivalent to applying Complex with a left argument of 0.
{{Built-in|Complex|⌾}} is a [[dyadic]] [[scalar function]] which combines its arguments into a [[complex number]] having with the left argument as real part and the right argument as imaginary part. It was added to [[J]] as <source lang=j inline>j.</source> together with initial support for complex numbers, and was adopted in [[Extended Dyalog APL]] using the [[glyph]] <source lang=apl inline>⌾</source> because it was seen as a type of numerical [[Beside|composition]] (<source lang=apl inline>∘</source>) for the [[Circle|circular]] (<source lang=apl inline>○</source>) domain. Complex shares its glyph with [[Imaginary]] which is equivalent to applying Complex with a left argument of 0.


The question of whether to include this function is one of [[Roger Hui]]'s 50 exercises in APL language design<ref>[[Roger Hui]]. Some Exercises in APL Language Design. Jsoftware. 2016.</ref>:
The question of whether to include this function is one of [[Roger Hui]]'s 50 exercises in APL language design<ref>[[Roger Hui]]. Some Exercises in APL Language Design. Jsoftware. 2016.</ref>:
Line 13: Line 13:
=== Documentation ===
=== Documentation ===


* J [https://www.jsoftware.com/help/dictionary/djdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/jdot#dyadic NuVoc] (only first-axis reverse exists)
* J [https://www.jsoftware.com/help/dictionary/djdot.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/jdot#dyadic NuVoc]
 
== References ==
== References ==
<references/>
<references/>
{{APL built-ins}}
{{APL built-ins}}[[Category:Primitive functions]][[Category:Scalar dyadic functions]]

Navigation menu