Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

felt_sign

Returns the sign of a signed felt252.

Uses sign-magnitude representation where values greater than HALF_PRIME are considered negative.

Returns

  • true if the value is negative
  • false if the value is positive or zero

Fully qualified path: cairo_fp::utils::felt_sign

fn felt_sign(a: felt252) -> bool