[Jprogramming] Question about complex arithmetic in J.

Don Kelly dhky at shaw.ca
Mon May 10 05:14:41 UTC 2021


Float is being used,

9!:11]16 sets 16 bit display


On 2021-05-04 11:22 p.m., Don Kelly wrote:+. 1 o. 1j1e_100
+. 1 o. 1j1e_11

0.8414709848078965 5.403023058681397e_12

+. 1 o. 1j1e_12

0.8414709848078965 5.403023058681398e_13

1 o. 1j1e_13

0.8414709848078965j5.403023058681398e_14

+. 1 o. 1j1e_14

0.8414709848078965 0    rounded off display and 1e_14 is close enough to 
0 to be shown as 0

however

1 o. 1j1e13

0.8414709848078965j5.403023058681398e_14

1 o. 1j1e_14

0.8414709848078965 drops the  0 as there is  only a single number as 1j0 
is 1

in other word with a 16 digit display the result is rounded off at 16 
digits even if the stored number  was 32 or 64  or whatever.

( Just my opinion)

Don





More information about the Programming mailing list