(type egg)
(signature "lognum egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/lognum" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "lognum" (section 3 "Introduction" (p "A logarithmic number system (LNS) is an arithmetic system for representing real numbers. In LNS, a number X, is represented by the logarithm L of its absolute value:") (pre "   X -> { s, L = \\log_b(|X|) }") (p "where " (tt "s") " denotes the sign of " (tt "X") " (" (tt "s = 1") " if " (tt "X > 0") " and " (tt "s = -1") " if " (tt "X < 0") ").")) (section 3 "Requirements" (dl (dt (int-link "matchable")) (dt (int-link "datatype")))) (section 3 "Library procedures" (def (sig (procedure "lognum?:: X -> BOOL" (id lognum?)) (procedure "lognum-sign:: X -> INTEGER" (id lognum-sign)) (procedure "lognum-value:: X -> NUMBER" (id lognum-value)) (procedure "number->lognum:: NUMBER -> LOGNUM" (id number->lognum)) (procedure "lognum->number:: LOGNUM -> NUMBER" (id lognum->number)) (procedure "lognum+:: A * B -> X" (id lognum+)) (procedure "lognum-:: A * B -> X" (id lognum-)) (procedure "lognum*:: A * B -> X" (id lognum*)) (procedure "lognum/:: A * B -> X" (id lognum/)) (procedure "lognum-neg:: A -> B" (id lognum-neg)) (procedure "lognum-abs:: A -> B" (id lognum-abs)) (procedure "lognum-signum:: A -> B" (id lognum-signum)) (procedure "lognum-recip:: A -> B" (id lognum-recip))))) (section 3 "Authors" (p "Ivan Raikov")) (section 3 "Version" (dl (dt "1.1") (dd "Ported to Chicken 4") (dt "1.0") (dd "Initial version"))) (section 3 "License" (p "Copyright 2009 Ivan Raikov and the Okinawa Institute of Science and Technology.") (p "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.") (p "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.") (p "A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.")))))
