Inheritance diagram for Double:
Public Types | |
typedef double | tValue |
Private Types | |
enum | Radix { Binary = 2, Octal = 8, Decimal = 10, Hexadecimal = 16 } |
Static Private Member Functions | |
tValue | pow10 (uint exp) |
tValue | parse (tChar[] src, uint *ate=null) |
tChar[] | format (tChar[] dst, tValue x, uint decimals=6, bool scientific=false) |
this () | |
package uint | trim (tChar[] digits, inout bool sign, Radix *radix=null) |
Used by modules Token and DisplayWriter
Definition at line 63 of file Double.d.
|
|
|
|
|
Definition at line 71 of file Double.d. References assert(), and tValue. Referenced by parse(). |
|
Convert a formatted string of digits to a floating- point number. Good for general use, but use David Gay's dtoa package if serious rounding adjustments should be applied. Definition at line 108 of file Double.d. References len, memicmp(), pow10(), Number::trim(), and tValue. |
|
Convert a float to a string. This produces pretty good results for the most part, though one should use David Gay's dtoa package for best accuracy. Note that the approach first normalizes a base10 mantissa, then pulls digits from the left side whilst emitting them (rightward) to the output. |
|
Definition at line 61 of file Number.d. References Number::error. |
|
Definition at line 70 of file Number.d. References len. Referenced by Long::parse(), Int::parse(), and parse(). |