3 structure V
= Word8Vector
4 structure P
= PackRealBig
6 fun down() = I
.setRoundingMode I
.TO_NEGINF
7 fun up() = I
.setRoundingMode I
.TO_POSINF
9 fun word8vectorToString v
= V
.foldr (fn(w
,s
) => Word8.toString w ^ s
) "" v
15 val _
= if R
.<=(x
,y
) then print
"YES\n" else print
"NO\n"
16 val _
= print(word8vectorToString (P
.toBytes x
) ^
"\n")
17 val _
= print(word8vectorToString (P
.toBytes y
) ^
"\n")
21 val x
= Option
.valOf (Real.fromString s
)
23 val y
= Option
.valOf (Real.fromString s
)
24 val _
= if R
.<=(x
,y
) then print
"YES\n" else print
"NO\n"
25 val _
= print(word8vectorToString (P
.toBytes x
) ^
"\n")
26 val _
= print(word8vectorToString (P
.toBytes y
) ^
"\n")
28 val da
= {class
= IEEEReal
.NORMAL
,
33 val x
= Option
.valOf (Real.fromDecimal da
)
35 val y
= Option
.valOf (Real.fromDecimal da
)
36 val _
= if R
.<=(x
,y
) then print
"YES\n" else print
"NO\n"
37 val _
= print(word8vectorToString (P
.toBytes x
) ^
"\n")
38 val _
= print(word8vectorToString (P
.toBytes y
) ^
"\n")