Exponential Minus One

<?php


echo expm1(1);
echo PHP_EOL;
echo exp(1) - 1;

You can save typing by using expm1($x) instead of exp($x) - 1. Also, you might have to take care of differences, as both results might be slightly different depending on the OS you’re running it on : Debian is OK, but MacOS says it’s different.

See Also

PHP Features

Last updated: 14 July 2026