#964 Numeric Tower

KevinKelley Sun 7 Feb 2010

Kawa implements a full scheme numeric tower, with Units, in Java. Its algorithms are transliterated from the GMP, which seems to be highly optimized. It uses "normal" two's-complement ints, overflowing into an array of ints, so bitwise ops come along for free, no need for a separate Bitset class.

I've been wishing for decent Numbers, and it seems like might be a good place to get them. Haven't got into the code yet, but I probably will make some attempt to get it ported to Fantom.

Anybody thought about this, know any reasons it'd be a bad idea?

jodastephen Sun 7 Feb 2010

I'd just be careful about porting the code, as you might need to use the same license, and a GPL library isn't terribly useful.

KevinKelley Sun 7 Feb 2010

I wondered about that too, but Kawa distribution comes with a COPYING file that says,

The software (with related files and documentation) in these packages
are copyright (C) 1996-2006  Per Bothner.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

which as far as I can tell is a "use as you like, credit but don't blame me" license.

Login or Signup to reply.