Re:A little thing to love about Perl 6 and COBOL
by lucianp on Wednesday February 04, 2015 @07:34PM
(#9001040)
Interesting! I wonder what drove their decision to use rational number representation.
Is it possible to turn this feature off and use floating point instead (for performance reasons, let's say)?
[ Parent
| on HN ]
Re:A little thing to love about Perl 6 and COBOL
by wwweston on Wednesday February 04, 2015 @07:42PM
(#9001075)
IIRC, there's several numeric types that conform to the larger `Numeric` type family: `Rat`, `Int`, and `Num` (which is basically a float).
`Rat` is what falls out of the expressions the OP was working with, specifying you want `Num` is possible.