Implement complete Floating-Point word set, 70+ float words
Separate float stack with fsp global, IEEE 754 double precision. Stack ops: FDROP FDUP FSWAP FOVER FROT FDEPTH Arithmetic: F+ F- F* F/ FNEGATE FABS FMAX FMIN FSQRT FLOOR FROUND F** Comparisons: F0= F0< F= F< F~ Memory: F@ F! SF@ SF! DF@ DF! FLOAT+ FLOATS FALIGNED FALIGN Conversions: D>F F>D S>F F>S Trig: FSIN FCOS FTAN FASIN FACOS FATAN FATAN2 FSINCOS Exp/Log: FEXP FEXPM1 FLN FLNP1 FLOG FALOG Hyperbolic: FSINH FCOSH FTANH FASINH FACOSH FATANH I/O: F. FE. FS. REPRESENT >FLOAT PRECISION SET-PRECISION Defining: FVARIABLE FCONSTANT FVALUE FLITERAL Float literal parsing (1E, 1.5E2, -3.14E0 format) 299 unit tests + 11 compliance tests, 0 errors on float test suite
This commit is contained in:
@@ -111,6 +111,12 @@ impl Dictionary {
|
||||
Ok(WordId(fn_index))
|
||||
}
|
||||
|
||||
/// Reserve a function index without creating a dictionary entry.
|
||||
/// Used for anonymous host functions (e.g., float literals during compilation).
|
||||
pub fn reserve_fn_index(&mut self) {
|
||||
self.next_fn_index += 1;
|
||||
}
|
||||
|
||||
/// Reveal the most recent word (remove HIDDEN flag).
|
||||
/// Called after `: ... ;` completes compilation.
|
||||
pub fn reveal(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user