{{ RealNumbers.spin}} CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 iB = 760 'Integer constants iC = 3875 iD = 1250 B = 7.6 'Floating-point constants C = 38.75 D = 12.5 K = 100.0 'Real-to-Pseudo-Real multiplier OBJ Term : "TV_Terminal" F : "FloatMath" FS : "FloatString" PUB Math Term.Start(12) {Integer constants (real numbers * 100) to do fast integer math} Term.Str(string("Pseudo-Real Number Result: ")) Term.Dec(iB*iC/iD) {Floating-point constants using FloatMath and FloatString objects} Term.Out(13) Term.Str(string("Floating-Point Number Result: ")) Term.Str(FS.FloatToString(F.FDiv(F.FMul(B, C), D))) {Floating-point constants translated to pseudo-real for fast math} Term.Out(13) Term.Str(string("Another Pseudo-Real Number Result: ")) Term.Dec(trunc(B*K)*trunc(C*K)/trunc(D*K))