Numbers

This page documents the results from the whiteboards where all Javapolis 2006 participants were encouraged to participate with their ideas.


Rational numbers

This idea was to add support for rational numbers.

Number a = 1;           // a is an Integer
Number b = a / 10;      // b is a Rational
// compiles as a.dividedBy(b)
Number c = b * b;       // c is a Rational
Number d = b * 10.2d;   // d is a Double

This concept was to allow very large numbers, and accurate fractions.

There were no comments on this idea.


Decimal primitive type

This idea was to add a decimal primitive type.

"Big Decimal Sucks
We need a native decimal type.
BigDecimal (optimized in JDK1.5) is 3 times slower than C# native decimal. Good assembly implementation is 15 times faster."

Comments included:

  • "So contribute the code!"

Adaptavist Theme Builder Powered by Atlassian Confluence