122-32000 Parallax Inc, 122-32000 Datasheet - Page 145

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Example Object: RealNumbers.spin
{{ RealNumbers.spin}}
CON
OBJ
PUB Math
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
iB
iC
iD
B
C
D
K
Term :
F
FS
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))
= 760
= 3875
= 1250
= 7.6
= 38.75
= 12.5
= 100.0
:
:
"TV_Terminal"
"FloatMath"
"FloatString"
'Integer constants
'Floating-point constants
'Real-to-Pseudo-Real multiplier
Propeller Manual v1.0 · Page 145

Related parts for 122-32000