[patch] Librep man patch on numbers

Hi all. Attached is a man patch on librep, regarding numbers.

For Changelog:
* man/librep.texi: Date of update is changed
* man/news.texi: What's added is written.
* man/lang.texi: 'Numbers' section is revised, mainly on machine dependence. Minor improvements.

Summary of the research:
* With gmp, integer and rational are infinite precision. Without gmp,
  integer is signed 30-bit for 32-bit platform, and rational is 
  converted to float (double precision).
* Overflow of integer is converted to float. (Wow.)
  (* 100000000 1000000000000) -> 7766279631452241920 on my machine,
  because it's casted into double. (Mine is 64-bit without gmp.)
* Sometimes (eq int1 int2) returns nil even if equal. Use eql or equal.
  (For big integers only, implemented via gmp? Not sure.)
* Without gmp, ceiling, floor, etc return float to avoid overflow,
  like libc counterparts.
* Nice functions string->number & number->string are available.
  It's just that they have lacked decription in doc.
* Orders of some subsections are exchanged.

It is easy to implement (max_int) function, but because it does not
make much sense (it's machine-dep), I didn't include it into the

I think version number of the manual is meaningless, so how about
removing it? News section items telling what's changed serve instead.

Chris, please apply the draft animator patch on 18 Apr, too. 

Teika (Teika kazura)

Attachment: librep-num.patch.bz2
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]