← All docs

gmp_neg()

Negates a GMP number.

gmp_neg()

function gmp_neg(object|string|int $num): object

Negates a GMP number.

Parameters:

  • $num (object|string|int)

Returns: object

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how gmp_neg is implemented in the compiler, see the internals page.