Skip to content

Commit

Permalink
move bcmath functions to runtime common (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
astrophysik authored Dec 20, 2024
1 parent 163dd0d commit 8664efb
Show file tree
Hide file tree
Showing 18 changed files with 1,109 additions and 969 deletions.
20 changes: 10 additions & 10 deletions builtin-functions/kphp-light/math.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,26 @@ define('PHP_ROUND_HALF_DOWN', 123423144);
define('PHP_ROUND_HALF_EVEN', 123423145);
define('PHP_ROUND_HALF_ODD', 123423146);


/** @kphp-extern-func-info generate-stub */
function bcadd ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;
/** @kphp-extern-func-info generate-stub */

function bccomp ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: int;
/** @kphp-extern-func-info generate-stub */

function bcdiv ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;
/** @kphp-extern-func-info generate-stub */

function bcmod ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;
/** @kphp-extern-func-info generate-stub */

function bcpow ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;
/** @kphp-extern-func-info generate-stub */

function bcmul ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;
/** @kphp-extern-func-info generate-stub */

function bcscale ($scale ::: int) ::: void;
/** @kphp-extern-func-info generate-stub */

function bcsqrt($num ::: string, $scale ::: int = PHP_INT_MIN): string;
/** @kphp-extern-func-info generate-stub */

function bcsub ($lhs ::: string, $rhs ::: string, $scale ::: int = PHP_INT_MIN) ::: string;

// ===== UNSUPPORTED =====

/** @kphp-extern-func-info generate-stub */
function is_finite ($v ::: float) ::: bool;
/** @kphp-extern-func-info generate-stub */
Expand Down
Loading

0 comments on commit 8664efb

Please sign in to comment.