below is some ways of multiplying 2 numbers. (with 20
print precision) At the very least this type of list
should be added to the vocabulary entry for x:.  This
behaviour has to be thoroughly documented and
rationalized because it is very astonishing.

To me though, the behaviour of x: should be
"infectuous" (From python: 2*2 = 4 but  2 * 2.0 = 4.0
- float result.).  Any appearance of x: or 12x in a
sentence should propagate to all numbers touched by
the extended precision number, since I cannot conceive
of a situation where the intent of  x: 1e12 f y is not
to produce a result with full precision as if it were
applied to all numbers that operate on it.  (I'd
suggest 2x*1e22 = x: 2e22) I would also prefer if
x:^_1 kept the full precision of its arguments.

  1e12 * (1e12-1)
9.9999999999900006e23
  x:^:_1 (1000000000000 * (1e12-1))
9.9999999999900006e23
  x:^:_1 (x: 1e12 * x: (1e12-1))
9.9999999999899993e23
  ((x: 1e12) *  ( 1e12-1))
9.9999999999899993e23
  (1000000000000x * x:(1e12-1))
999999999999000000000000
  (x: 1e12* x:(1e12-1)) NB. Parsing mistake :(
4398046511099602314444247010272265625r4398046511104
  (x: 1e12)* x:(1e12-1)
999999999999000000000000
  x:^:_1 ((x: 1e12) *  x:(1e12-1))
9.9999999999899993e23
   
  (x:1e10) * x:1e12
10000000000000000000000
   ((x:!.0) 1e22)
10995116277760000526905059814453125r1099511627776
   x: 1e22
10995116277760000526905059814453125r1099511627776
   

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to