;;; note: source file /home/ian/Downloads/string-conversion.scm ;;; newer than compiled /home/ian/.cache/guile/ccache/2.0-LE-4-2.0/home/ian/Downloads/string-conversion.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/ian/Downloads/string-conversion.scm ;;; compiled /home/ian/.cache/guile/ccache/2.0-LE-4-2.0/home/ian/Downloads/string-conversion.scm.go -> Simple integers ----------------------------------------------------- OK ("1" 1) OK ("+1" 1 "1") OK ("-1" -1) OK ("#i1" 1.0 "1.0" "1.") OK ("#I1" 1.0 "1.0" "1.") OK ("#i-1" -1.0 "-1.0" "-1.") OK ("-#i1" #f) OK ("+-1" #f) OK ("" #f) OK ("-" #f) OK ("+" #f) OK ("+-" #f) -> Basic decimal notation ----------------------------------------------------- OK ("1.0" 1.0 "1.") OK ("1." 1.0 "1.0" "1.") OK ("1.#" 1.0 1.5 "1.0" "1." "1.5") OK (".1" 0.1 "0.1" "100.0e-3") OK ("-.1" -0.1 "-0.1" "-100.0e-3") OK ("-.0" -0.0 "-0." "-0.0" "0.0" "0." ".0") OK ("-0." -0.0 "-.0" "-0.0" "0.0" "0." ".0") OK ("." #f) OK (".1." #f) OK ("..1" #f) OK ("1.." #f) OK ("#i1.0" 1.0 "1.0" "1.") OK ("#e1.0" 1 "1") OK ("#e-.0" 0 "0") OK ("#e-0." 0 "0") OK ("-#e.0" #f) -> Decimal notation with padding ----------------------------------------------------- OK ("1#" 10.0 15.0 "10.0" "15.0" "10." "15.") OK ("#e1#" 10 15 "10" "15") OK ("#E1#" 10 15 "10" "15") OK ("#1" #f) OK ("#" #f) OK ("1#2" #f) OK ("1.#2" #f) OK (".#" #f) OK ("#.#" #f) OK ("#.1" #f) OK ("1#.2" #f) OK ("1#." 10.0 15.0 "10.0" "15.0" "10." "15.") -> Decimal notation with suffix ----------------------------------------------------- OK ("1e2" 100.0 "100.0" "100.") OK ("1E2" 100.0 "100.0" "100.") OK ("1s2" 100.0 "100.0" "100.") OK ("1S2" 100.0 "100.0" "100.") OK ("1f2" 100.0 "100.0" "100.") OK ("1F2" 100.0 "100.0" "100.") OK ("1d2" 100.0 "100.0" "100.") OK ("1D2" 100.0 "100.0" "100.") OK ("1l2" 100.0 "100.0" "100.") OK ("1L2" 100.0 "100.0" "100.") OK ("1e2e3" #f) OK ("1e2s3" #f) OK ("1e2.0" #f) -> Decimal notation with suffix and padding ----------------------------------------------------- OK ("1#e2" 1000.0 1500.0 "1000.0" "1500.0" "1000." "1500." "1.0e3" "15.0e2") OK ("1e2#" #f) -> NaN, Inf ----------------------------------------------------- OK ("+nan.0" +nan.0 "+NaN.0") PARSE ERROR ("+NAN.0" +nan.0 "+nan.0" "+NaN.0") => #f PARSE ERROR ("+nan.1" #f) => +nan.0 PARSE ERROR ("+nan.01" #f) => +nan.0 OK ("+inf.0" +inf.0 "+Inf.0") PARSE ERROR ("+InF.0" +inf.0 "+inf.0" "+Inf.0") => #f OK ("-inf.0" -inf.0 "-Inf.0") PARSE ERROR ("-iNF.0" -inf.0 "-inf.0" "-Inf.0") => #f OK ("+inf.01" #f) OK ("+inf.1" #f) OK ("-inf.01" #f) OK ("-inf.1" #f) OK ("+inf.0/1" #f) OK ("1/+inf.0" #f) OK ("+nan" #f) OK ("+inf" #f) OK ("-inf" #f) PARSE ERROR ("nan.0" #f) => +nan.0 PARSE ERROR ("inf.0" #f) => +inf.0 PARSE ERROR ("#e+nan.0" #f) => +nan.0 PARSE ERROR ("#e+inf.0" #f) => +inf.0 PARSE ERROR ("#e-inf.0" #f) => -inf.0 OK ("#i+nan.0" +nan.0 "+nan.0" "+NaN.0") OK ("#i+inf.0" +inf.0 "+inf.0" "+Inf.0") OK ("#i-inf.0" -inf.0 "-inf.0" "-Inf.0") -> Fractions ----------------------------------------------------- OK ("1/2" 1/2) OK ("#e1/2" 1/2 "1/2") OK ("10/2" 5 "5") OK ("-1/2" -1/2) OK ("0/10" 0 "0") OK ("#e0/10" 0 "0") OK ("#e1#/2" 5 15/2 "5" "15/2") OK ("#e1/2#" 1/20 "1/20") OK ("#i3/2" 1.5 "1.5") OK ("1/-2" #f) OK ("1.0/2" #f) OK ("1/2.0" #f) OK ("1/2e2" #f) OK ("1/2e2" #f) OK ("1#/2" 5.0 7.5 "5.0" "5." "7.5") OK ("1/2#" 0.05 "0.05" ".05" "50.0e-3") OK ("1#/#" #f) OK ("1/" #f) OK ("1/+" #f) OK ("+/1" #f) OK ("/1" #f) OK ("/" #f) -> Basic complex numbers (rectangular notation) ----------------------------------------------------- OK ("1+2i" 1.0+2.0i "1.0+2.0i" "1.+2.i") OK ("1+2I" 1.0+2.0i "1.0+2.0i" "1.+2.i") OK ("1-2i" 1.0-2.0i "1.0-2.0i" "1.-2.i") OK ("-1+2i" -1.0+2.0i "-1.0+2.0i" "-1.+2.i") OK ("-1-2i" -1.0-2.0i "-1.0-2.0i" "-1.-2.i") OK ("+i" 0.0+1.0i "+1.i" "+1.0i" "0.+1.i" "0.0+1.0i") OK ("0+i" 0.0+1.0i "0+1i" "+1.i" "+1.0i" "0.+1.i" "0.0+1.0i") OK ("0+1i" 0.0+1.0i "+1.i" "+1.0i" "0.+1.i" "0.0+1.0i") OK ("-i" 0.0-1.0i "-1.i" "-1.0i" "0.-1.i" "0.0-1.0i") OK ("0-i" 0.0-1.0i "-1.i" "-1.0i" "0.-1.i" "0.0-1.0i") OK ("0-1i" 0.0-1.0i "-1.i" "-1.0i" "0.-1.i" "0.0-1.0i") OK ("+2i" 0.0+2.0i "+2.0i" "+2.i" "0.+2.i" "0.0+2.0i") OK ("-2i" 0.0-2.0i "-2.0i" "-2.i" "0.-2.i" "0.0-2.0i") OK ("1#+1#i" 10.0+10.0i 15.0+15.0i "10.0+10.0i" "10.+10.i" "15.0+15.0i" "15.+15.i") OK ("2i" #f) OK ("+-i" #f) OK ("i" #f) OK ("1+2i1" #f) OK ("1+2" #f) OK ("1#+#i" #f) -> Decimal-notation complex numbers (rectangular notation) ----------------------------------------------------- OK ("1.0+2i" 1.0+2.0i "1.0+2.0i" "1.0+2i" "1.+2i" "1.+2.i") OK ("1+2.0i" 1.0+2.0i "1.0+2.0i" "1+2.0i" "1.+2.i" "1+2.i") OK ("1#.+1#.i" 10.0+10.0i 15.0+15.0i "10.0+10.0i" "10.+10.i" "15.0+15.0i" "15.+15.i") OK ("1e2+1.0i" 100.0+1.0i "100.0+1.0i" "100.+1.i") OK ("1s2+1.0i" 100.0+1.0i "100.0+1.0i" "100.+1.i") OK ("1.0+1e2i" 1.0+100.0i "1.0+100.0i" "1.+100.i") OK ("1.0+1s2i" 1.0+100.0i "1.0+100.0i" "1.+100.i") OK ("1#e2+1.0i" 1000.0+1.0i 1500.0+1.0i "1000.0+1.0i" "1000.+1.i" "1500.0+1.0i" "1500.+1.i" "1.0e3+1.0i" "15.0e2+1.0i") OK ("1.0+1#e2i" 1.0+1000.0i 1.0+1500.0i "1.0+1000.0i" "1.+1000.i" "1.0+1500.0i" "1.+1500.i" "1.0+1.0e3i" "1.0+15.0e2i") OK (".i" #f) OK ("+.i" #f) OK (".+i" #f) -> Fractional complex numbers (rectangular notation) ----------------------------------------------------- OK ("1/2+3/4i" 0.5+0.75i "0.5+0.75i" ".5+.75i" "500.0e-3+750.0e-3i") -> Mixed fractional/decimal notation complex numbers (rectangular notation) ----------------------------------------------------- OK ("1#/2+3/4i" 5.0+0.75i 7.5+0.75i "5.0+0.75i" "5.+.75i" "7.5+0.75i" "5.0+3/4i" "5.+3/4i" "7.5+3/4i" "5.0+750.0e-3i") OK ("0.5+3/4i" 0.5+0.75i "0.5+0.75i" ".5+.75i" "0.5+3/4i" ".5+3/4i" "500.0e-3+750.0e-3i") OK ("1.5+1#/4i" 1.5+2.5i 1.5+3.75i "1.5+2.5i" "1.5+3.75i") OK ("0.5+1/#i" #f) OK ("0.5+1/1#2i" #f) OK ("1/#+0.5i" #f) OK ("1/1#2+0.5i" #f) -> Mixed notation with infinity (might fail on mixed exactness compnums) ----------------------------------------------------- -> Complex NaN, Inf (rectangular notation) ----------------------------------------------------- OK ("+nan.0+nan.0i" +nan.0+nan.0i "+NaN.0+NaN.0i") OK ("+inf.0+inf.0i" +inf.0+inf.0i "+Inf.0+Inf.0i") OK ("-inf.0+inf.0i" -inf.0+inf.0i "-Inf.0+Inf.0i") OK ("-inf.0-inf.0i" -inf.0-inf.0i "-Inf.0-Inf.0i") OK ("+inf.0-inf.0i" +inf.0-inf.0i "+Inf.0-Inf.0i") -> Complex numbers (polar notation) ----------------------------------------------------- OK ("address@hidden" #f) OK ("address@hidden/#" #f) OK ("address@hidden/1#2" #f) OK ("1/address@hidden" #f) OK ("1/address@hidden" #f) OK ("1@" #f) OK ("address@hidden" #f) OK ("1/@" #f) OK ("@/1" #f) OK ("@1" #f) OK ("address@hidden" #f) OK ("address@hidden" #f) OK ("@" #f) -> Base prefixes ----------------------------------------------------- OK ("#x11" 17 "17") OK ("#X11" 17 "17") OK ("#d11" 11 "11") OK ("#D11" 11 "11") OK ("#o11" 9 "9") OK ("#O11" 9 "9") OK ("#b11" 3 "3") OK ("#B11" 3 "3") OK ("#da1" #f) OK ("#o8" #f) OK ("#b2" #f) OK ("#o7" 7 "7") OK ("#xa" 10 "10") OK ("#xA" 10 "10") OK ("#xf" 15 "15") OK ("#xg" #f) OK ("#x-10" -16 "-16") OK ("#d-10" -10 "-10") OK ("#o-10" -8 "-8") OK ("#b-10" -2 "-2") OK ("-#x10" #f) OK ("-#d10" #f) OK ("-#o10" #f) OK ("-#b10" #f) OK ("#x-" #f) OK ("#x" #f) OK ("#d" #f) OK ("#d-" #f) OK ("#d+" #f) OK ("#o" #f) OK ("#o-" #f) OK ("#b" #f) OK ("#b-" #f) OK ("#e" #f) OK ("#e-" #f) OK ("#i" #f) OK ("#i-" #f) -> Combination of prefixes ----------------------------------------------------- OK ("#x#x11" #f) OK ("#x#b11" #f) OK ("#b#o11" #f) OK ("#e#x10" 16 "16") OK ("#i#x10" 16.0 "16.0" "16.") OK ("#e#e10" #f) OK ("#e#e#x10" #f) OK ("#E#e#X10" #f) OK ("#i#e#x10" #f) OK ("#e#x#e10" #f) OK ("#x#x#e10" #f) OK ("#x#e#x10" #f) -> Base prefixes with padding ----------------------------------------------------- OK ("#x1#0" #f) OK ("#d1#0" #f) OK ("#o1#0" #f) OK ("#b1#0" #f) OK ("#x1#" 16.0 24.0 "16.0" "24.0" "16." "24.") OK ("#d1#" 10.0 15.0 "10.0" "15.0" "10." "15.") OK ("#o1#" 8.0 12.0 "8.0" "12.0" "8." "12.") OK ("#b1#" 2.0 3.0 "2.0" "3.0" "2." "3.") -> (Attempted) decimal notation with base prefixes ----------------------------------------------------- OK ("#x1.0" #f) OK ("#d1.0" 1.0 "1.0" "1.") OK ("#o1.0" #f) OK ("#b1.0" #f) OK ("#x1.#" #f) OK ("#d1.#" 1.0 1.5 "1.0" "1.5" "1.") OK ("#o1.#" #f) OK ("#b1.#" #f) OK ("#x1." #f) OK ("#d1." 1.0 "1.0" "1.") OK ("#o1." #f) OK ("#b1." #f) OK ("#x.1" #f) OK ("#d.1" 0.1 "0.1" ".1" "100.0e-3") OK ("#o.1" #f) OK ("#b.1" #f) OK ("#x1e2" 482 "482") OK ("#d1e2" 100.0 "100.0" "100.") OK ("#o1e2" #f) OK ("#b1e2" #f) -> Fractions with prefixes ----------------------------------------------------- OK ("#x10/2" 8 "8") OK ("#x11/2" 17/2 "17/2") OK ("#d11/2" 11/2 "11/2") OK ("#o11/2" 9/2 "9/2") OK ("#b11/10" 3/2 "3/2") OK ("#b11/2" #f) OK ("#x10/#o10" #f) OK ("10/#o10" #f) OK ("#x1#/2" 8.0 12.0 "8.0" "8." "12.0" "12.") OK ("#d1#/2" 5.0 7.5 "5.0" "5." "7.5") OK ("#o1#/2" 4.0 6.0 "4.0" "4." "6.0" "6.") OK ("#b1#/2" #f) OK ("#b1#/10" 1.0 1.5 "1.0" "1." "1.5") -> Complex numbers with prefixes ----------------------------------------------------- OK ("#x1#+1#i" 16.0+16.0i 24.0+24.0i "16.0+16.0i" "16.+16.i" "24.0+24.0i" "24.+24.i") OK ("#x1.0+1.0i" #f) OK ("#d1.0+1.0i" 1.0+1.0i "1.0+1.0i" "1.+1.i") OK ("#o1.0+1.0i" #f) OK ("#b1.0+1.0i" #f) OK ("#x10+#o10i" #f) OK ("10+#o10i" #f) OK ("address@hidden" #f) OK ("address@hidden" #f) OK ("#x10+11i" 16.0+17.0i "16.0+17.0i" "16.+17.i") OK ("#d10+11i" 10.0+11.0i "10.0+11.0i" "10.+11.i") OK ("#o10+11i" 8.0+9.0i "8.0+9.0i" "8.+9.i") OK ("#b10+11i" 2.0+3.0i "2.0+3.0i" "2.+3.i") -----> TOTAL ERRORS: 10 Some deprecated features have been used. Set the environment variable GUILE_WARN_DEPRECATED to "detailed" and rerun the program to get more information. Set it to "no" to suppress this message.