Skip to main content

rem2pif_small

Function rem2pif_small 

Source
fn rem2pif_small(x: f32) -> f64
Expand description

Generated by SageMath:

def triple_double_split(x, n):
    VR = RealField(1000)
    R32 = RealField(n)
    hi = R32(x)
    rem1 = x - VR(hi)
    med = R32(rem1)
    rem2 = rem1 - VR(med)
    lo = R32(rem2)
    rem2 = rem1 - VR(med)
    lo = R32(rem2)
    return (hi, med, lo)

hi, med, lo = triple_double_split((RealField(600).pi() * RealField(600)(2)), 51)

print(double_to_hex(hi))
print(double_to_hex(med))
print(double_to_hex(lo))