They don't remember their parentage - they have different precisions.
Add them together or apply (,) between them and only one precision can
survive.
I think there is little practical difference. (1000000000 $ y) will
take a lot more space with one than the other. Some special
combinations only apply to Booleans. Some operations (x * y for
example) go faster when one argument is Boolean.
PUZZLE:
There is one tiny way that the difference can become significant, i. e.
can change the type (not just the precision) of a result. Can you find
it? The answer is in NuVoc, but tucked away in a corner!
Henry Rich
On 1/12/2018 12:06 AM, Ian Clark wrote:
For years I've laboured under the delusion that nouns (i.0) and (0$0) are
identical in all respects, and will pass any tests designed to discriminate
between them.
However 5!:5 can tell the difference:
5!:5 <'z' [z=: i.0
i.0
5!:5 <'z' [z=: 0$0
0$0
Nor, it seems, is there any fooling it:
5!:5 <'z' [z=: 5}.5{.i.0
i.0
5!:5 <'z' [z=: 6}.5{.i.0
i.0
5!:5 <'z' [z=: 5}.5{.0$0
0$0
5!:5 <'z' [z=: 6}.5{.0$0
0$0
How does 5!:5 know? Is this Just One of Those Things? Or is there some
deliberate logic behind this subtle difference between (0$0) and (i.0)?
Does this difference emerge in other ways – ones which might impact
practical tasks?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by AVG.
http://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm