greenServeFE logogreenServeFELanguage, VM and Native Module Reference

Documentation home / Native Module API

Native Module API

Scalar Mathematics

Scalar mathematical helpers and constants for common arithmetic, rounding, logarithmic and exponential operations.

Purpose

Scalar mathematical helpers and constants for common arithmetic, rounding, logarithmic and exponential operations.

Exported API

ExportRole
absabs native function or exported value
floorfloor native function or exported value
ceilceil native function or exported value
roundround native function or exported value
sqrtsqrt native function or exported value
loglog native function or exported value
log10log10 native function or exported value
expexp native function or exported value
powpow native function or exported value
minmin native function or exported value
maxmax native function or exported value
clampclamp native function or exported value
pipi native function or exported value
ee native function or exported value

Usage example

import gs_math;
print(gs_math.sqrt(81));
print(gs_math.pow(2, 10));
print(gs_math.clamp(150, 0, 100));
print(gs_math.pi);
This module is distinct from gsnum and gs_compute; use its small scalar API for basic math.

Related documentation