math_extra.sml 162 B

12345678910
  1. structure MathExtra = struct
  2. fun sign num =
  3. if num > 0
  4. then 1
  5. else
  6. if num < 0
  7. then ~1
  8. else 0;
  9. end