1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00
QB64-PE/internal/help/_FLOAT.txt

32 lines
1.4 KiB
Plaintext
Raw Normal View History

2016-03-18 11:36:04 +00:00
{{DISPLAYTITLE:_FLOAT}}
'''_FLOAT''' numerical values offer the maximum floating-point decimal precision available using '''QB64'''.
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
::[[DIM]] {{Parameter|variable}} AS [[_FLOAT]]
{{PageDescription}}
* '''QB64''' always allocates 32 bytes to store this value.
2017-10-10 14:55:21 +00:00
* It is safe to assume this value is at least as precise as [[DOUBLE]].
* Under the current implementation it is stored in a 10-byte floating point variable.
2017-10-10 14:55:21 +00:00
* [[_FLOAT]] variables can also use the ## variable name type suffix.
* Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
2017-10-10 14:55:21 +00:00
* According to [http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html IEEE-754] this can store a value of up to 1.1897E+4932 compared to a DOUBLE which goes up to 1.7976E+308.
* Floating decimal point numerical values cannot be [[_UNSIGNED]].
* Values can be converted to 32 byte [[ASCII]] strings using [[_MK$]] and back with [[_CV]].
* '''When a variable has not been assigned or has no type suffix, the value defaults to [[SINGLE]].'''
2017-10-10 14:55:21 +00:00
* Note: OpenGL's [[_GL_FLOAT]] constant is a [[SINGLE]] (4 byte) floating point number, while a native QB64 _FLOAT is a 10-byte floating point number.
{{PageSeeAlso}}
* [[DOUBLE]], [[SINGLE]]
* [[_MK$]], [[_CV]]
* [[_DEFINE]], [[DIM]]
2017-10-10 14:55:21 +00:00
* [[PDS (7.1) Procedures#CURRENCY|CURRENCY]]
* [[Variable Types]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}
<