Commit Graph
9 Commits
Author SHA1 Message Date
Sven Bergström 92419c79cd docs: clarify modulus operator sign behavior in num.markdown
The floating-point remainder operator % now explicitly documents that the
returned value retains the sign of the dividend (this), matching the
behavior of C's fmod function. This addresses issue #695 by removing
ambiguity about sign handling in the modulus documentation.
2019-09-18 05:27:47 +00:00
Kyle Charters 884e6853d3 feat: add Num.round method for rounding numbers to nearest integer
Implement the `round` method on the Num class that rounds a number to the nearest integer using standard rounding rules (away from zero for .5). The implementation adds a new `num_round` primitive function in the VM core, registers it as a method on the Num class, includes documentation in the core module reference, and adds a comprehensive test file covering positive, negative, zero, and fractional cases.
2017-09-21 00:27:02 +00:00
Nathan Hourt 67ca0e04f6 fix: correct bitwise or documentation to describe or instead of and behavior
The documentation for the bitwise or operator incorrectly stated that each bit
is true only where corresponding bits of both inputs were true, which describes
the bitwise and operator. Updated to correctly state that each bit is true where
corresponding bits of one or both inputs were true.
2017-03-30 22:45:12 +00:00
Bob Nystrom 65d4481fae docs: add documentation for Num.log and Num.pow() methods in core module 2017-01-20 15:24:46 +00:00
Bob Nystrom c29f3e694f fix: replace DBL_EPSILON with DBL_MIN for Num.smallest in wren_core.c
Change the C implementation of `num_smallest` primitive to return `DBL_MIN` instead of `DBL_EPSILON`, correcting the value from the machine epsilon (difference between 1.0 and next representable value) to the smallest positive representable double. Update the documentation in `num.markdown` to describe `Num.smallest` as "the smallest positive representable numeric value" and `Num.largest` as "the largest representable numeric value". Add test files `largest.wren` and `smallest.wren` verifying the expected output values.
2016-08-28 00:25:32 +00:00
Johann Muszynski 4050e7128b docs: rename Num.highest to Num.largest and Num.lowest to Num.smallest in core module docs 2016-08-04 18:17:45 +00:00
Johann Muszynski a53a86f469 docs: document Num.highest, Num.lowest, and Num.epsilon properties in core num module 2016-07-10 20:26:23 +00:00
Mathieu Gagnon 0e138c8b0a fix: correct abs code sample in num docs to show proper precedence with parentheses 2016-02-11 22:58:09 +00:00
Bob Nystrom 909c242a03 chore: reorganize doc site structure by moving core docs under modules/ and removing category metadata
Restructure the documentation hierarchy to prepare for documenting additional built-in modules. Move all core library documentation from `doc/site/core/` to `doc/site/modules/core/`, rename `modules.markdown` to `modularity.markdown`, remove `^category` metadata lines from all affected pages, update cross-reference links to use relative paths under the new structure, and add a TODO placeholder to the Class class page.
2015-11-08 21:31:22 +00:00