Repository navigation
Compiler Option Fpmode
Home › Compiler Option: -fpmode
Selects faster, less accurate or slower, more precise floating-point math.
Syntax
-fpmode < mode >
Parameters
mode
The floating point mode: FAST | PRECISE.
Description
The -fpmode compiler option specifies whether speed or precision is more important for floating point math. If this option is not specified, the default is -fpmode PRECISE.
-fpmode FAST will generate faster, less accurate instructions for certain floating point operations.
-fpmode PRECISE will generate standard floating point instructions that operate at the default speed and accuracy of the selected floating point unit.
Currently, the only floating point operations that behave differently when using -fpmode FAST are: Sin(), Cos(), reciprocal, and reciprocal Square Root, all of which must operate on Single precision values.
A number of changes were made to normalize handling of NaN's (Not a Number) to get consistent results across toolchains and platforms, but that costs extra code, so intention was that -fpmode FAST could allow user to skip that extra code generation if they wanted (and they assume responsibility how things work or do not work across platforms).
Note:
- for x86 and x86_64, default is -fpu x87 -fpmode PRECISE
- -fpmode FAST|PRECISE controls code generation by the compiler only
- for optimizing with '-gen gcc' backend, use '-Wc -ffast-math'
See also
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing