Is there a trick I am missing?
Yes, something very simple: big→
) which you find in both the Integer
I think the command you may really want is toBin
, though, which does work with both BigInts and Reals.
commands deal with hex, binary, and octal numbers and mainly exist for backwards compatibility to HP calcs. There, a "Binary" number is *not* a number represented by 0s and 1s. Rather it's its own 32- or 64-bit data type that is capable of the functions in the Binary
menus of these calcs. You have to convert to a Binary if you want to use these functions and you have to convert back to use Reals. In ND1, BigInts and Reals looking like ints are capable of these functions, and it's not necessary to convert a Real into Binary to make it suitable for these functions. Octal, binary, and hex numbers are converted back into Reals with fromBinary
, but all toBinary
does is shave off any fractional part from an input Real. The result is still a Real.
And, yes, this function should not give an error when invoked on a BigInt. (Instead, it should be a no-op.) I'll fix that with the next update. Thanks!