summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2025-08-02 20:15:06 +0900
committerYusuke Endoh <mame@ruby-lang.org>2025-08-21 20:05:52 +0900
commitf2b1017b3df5f93aaf1d4ccd758d341298aa8dcc (patch)
tree456c92abfccb2a5b75fee87709e46881a2f403e4 /include/ruby/ruby.h
parentfeb83316730548d31b4be8076b8316e8e17d8b00 (diff)
Add `Math.log1p` and `Math.expm1`
This commit adds two new methods to the `Math` module: * `Math.log1p(x)`: Computes `Math.log(x + 1)` * `Math.expm1(x)`: Computes `Math.exp(x) - 1` These methods are often more accurate than the straightforward computation, especially when `x` is close to zero. The corresponding functions, `log1p` and `expm1`, are defined in the C99 standard math library. [Feature #21527]
Diffstat (limited to 'include/ruby/ruby.h')
0 files changed, 0 insertions, 0 deletions