source: project/wiki/eggref/4/fpio @ 14393

Last change on this file since 14393 was 14393, checked in by Ivan Raikov, 11 years ago

Added an entry for version 1.3

File size: 1.6 KB
Line 
1[[tags: egg]]
2
3== Introduction
4
5The {{fpio}} library contains a routines for converting floating-point
6numbers between IEEE binary representation and decimal string
7representation. It is based on the [[http://www.netlib.org/fp/|gdtoa]]
8library by David Gay.
9
10There are two routines included with the library, {{string->fp}} and
11{{fp->string}}.
12
13== Library procedures
14
15=== {{fp->string:: NUMBER [* NDIGITS] -> STRING}}
16
17Converts the given floating-point number to decimal string
18representation.  If optional argument {{NDIGITS}} is positive, the
19conversion is done to the specified number of decimal places. If
20{{NDIGITS}} is zero (the default) or negative, the conversion is done
21to the shortest decimal string that rounds to the given floating point
22value.
23
24=== {{string->fp:: STRING [* ROUNDING] -> NUMBER}}
25
26Converts the given decimal string number to binary IEEE floating point
27representation.  Optional argument {{ROUNDING}} is a symbol that can
28be one of:
29
30; {{toward-zero}} : indicates rounding-towards-zero mode (the default)
31; {{nearest}} : indicates rounding-towards-nearest mode
32; {{toward+Inf}} : indicates rounding-towards +Inf mode
33; {{toward-Inf}} : indicates rounding-towards -Inf mode
34
35
36== Authors
37
38Ivan Raikov
39
40== Version
41
42; 1.3 : Ported to Chicken 4
43; 1.2 : Fixes to the file manifest
44; 1.0 : Initial version
45
46== License
47
48Copyright 2008 Ivan Raikov.
49
50Permission to use, copy, modify, and distribute this software and its
51documentation for any purpose and without fee is hereby granted,
52provided that the above copyright notice appear in all copies and that
53both that the copyright notice and this permission notice appear in
54supporting documentation.
55
Note: See TracBrowser for help on using the repository browser.