chibi-scheme icon indicating copy to clipboard operation
chibi-scheme copied to clipboard

Hugenums not working

Open GoogleCodeExporter opened this issue 9 years ago • 3 comments

HEAD of hugenums branch on Linux:

$ chibi-scheme -xscheme.base
> (exact 2->2)
ERROR on line 1: exact: not a number: 2->2
> (+ 2->2 1)
2->2
> (+ 2->2 2->2)
2->2
> 1e100
1e+100.0
> 1e1e100
1e100000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000
> 1e1e1e100
1e100000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000
> 2->2
2->2
> 2->3->2
2->3->2
> (exact 2->3->2)
ERROR on line 9: exact: not a number: 2->3->2
> (+ 2->3->2 2->3->2)
Segmentation fault
$ 

Original issue reported on code.google.com by [email protected] on 22 Dec 2012 at 6:36

GoogleCodeExporter avatar Mar 16 '15 12:03 GoogleCodeExporter

Hugenums is a WIP branch - it's only about half done, and
I have much more important things to work on right now.

However, what you see with addition is correct - for very
large numbers, their sum and product is equivalent to max.

Also, exact is expected to error on hugenums in the
general case because they will not fit in an exact representation.

Part of the missing logic is normalizing "small" hugenums
back into floats when possible, so that 2->2 => 4.0.

Original comment by [email protected] on 22 Dec 2012 at 6:55

  • Changed state: Invalid

GoogleCodeExporter avatar Mar 16 '15 12:03 GoogleCodeExporter

So leave the issue open for when you do work on them.

Original comment by [email protected] on 22 Dec 2012 at 8:01

GoogleCodeExporter avatar Mar 16 '15 12:03 GoogleCodeExporter

The issue is confusing because many of the examples
you give are correct, but rather than split out the
individual TODOs I'll leave this as a placeholder until
the implementation is more complete.

Original comment by [email protected] on 22 Dec 2012 at 8:05

  • Changed state: Accepted

GoogleCodeExporter avatar Mar 16 '15 12:03 GoogleCodeExporter