always 2 but useful for assertions if you want to future-proof code
that assumes it with a noisy failure in case we ever violate the
assumption.
-- flo:radix. - Floating-point radix as a flonum.
+. flo:radix. - Floating-point radix as a flonum.
+. flo:precision - Number of digits in a significand, including the hidden
+ one bit for normal binary floating-point numbers. For binary64
+ floating-point, this is 53.
. flo:error-bound - Greatest possible relative error in rounding to nearest.
. flo:log-error-bound = (log flo:error-bound)
. flo:ulp-of-one - Distance from 1 to next greater floating-point number.
(define-integrable flo:radix 2)
(define-integrable flo:radix. 2.)
+(define flo:precision)
(define flo:ulp-of-one)
(define flo:error-bound)
(define flo:log-error-bound)
(define (initialize-microcode-dependencies!)
(let ((p microcode-id/floating-mantissa-bits))
+ (set! flo:precision p)
(set! flo:significand-digits-base-2 p)
;; Add two here because first and last digits may be
;; "partial" in the sense that each represents less than the
(- z))))))
(assert (= flo:radix 2))
-(define flo:precision flo:significand-digits-base-2)
(define-enumerated-test 'exact->inexact
`((,(+ 1 (expt flo:radix flo:precision))