mantissa-and-guard ( epsilon? num den scale -- epsilon?' mantissa-and-guard rem scale' )


Vocabulary
math.integers.private

Inputs
epsilon?an object
numan object
denan object
scalean object


Outputs
epsilon?'an object
mantissa-and-guardan object
reman object
scale'an object


Definition


: mantissa-and-guard
( epsilon? num den scale -- epsilon?' mantissa-and-guard rem scale' )
2over /i log2 53 >
[ [ (2/-with-epsilon) ] [ ] [ 1 + ] tri* ] when dup -1021 <
[ (shift-with-epsilon) ] when [ /mod ] dip ; inline