Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

cbrt

Calculates the cube root.

Preserves sign: cbrt(-8) = -2

Useful for 3-asset AMM pool calculations (geometric mean of 3 values).

Gas Cost

~217,000 - ~363,000 (f128)

Fully qualified path: cairo_fp::f128::math::ops::cbrt

fn cbrt(a: Fixed) -> Fixed