Easy as { 1 2 3 }? (when { 1 2 3 } ≠ { 1 2 3 })
|
07-17-2018, 04:51 PM
Post: #22
|
|||
|
|||
RE: Easy as { 1 2 3 }?
(07-17-2018 04:00 PM)ttw Wrote: The SIGN function behaves strangely too. The behaviour is exactly as described in the AUR: "In exact mode, the sign for argument 0 is undefined (?). In approximate mode, the sign for argument 0 is 0" Your first 0 is an exact 0 (no trailing decimal mark), hence the undefined result. By multiplying with 1. (approximate 1) you are making all elements approximate, hence 0 will become 0. and the result of SIGN will be 0. as described. (Interesting that you then convert the result to all numbers to quotient (exact) format when half your list was decimal format to start with). Also if you set Flag -03 then SIGN will return {0. 1. -1. 0. 1. -1.} . |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)