Overview  Index  Help 
Standard ML Basis Library

IEEE_REAL

All Known Implementing Modules:

IEEEReal


signature IEEE_REAL =
sig
  type decimal_approx =
       {kind : float_class, sign : bool, digits : int list, exp : int}
  datatype real_order = LESS | EQUAL | GREATER | UNORDERED
  datatype nan_mode = QUIET | SIGNALLING
  datatype float_class = NAN of nan_mode | INF | ZERO | NORMAL | SUBNORMAL
  datatype rounding_mode = TO_NEAREST | TO_NEGINF | TO_POSINF | TO_ZERO
  exception Unordered
  val setRoundingMode : rounding_mode -> unit
  val getRoundingMode : unit -> rounding_mode
  val toString : decimal_approx -> string
  val fromString : string -> decimal_approx option
  val scan
      : (char, 'a) StringCvt.reader -> (decimal_approx, 'a) StringCvt.reader
end

 
Type detail

decimal_approx

type decimal_approx =
     {kind : float_class, sign : bool, digits : int list, exp : int}

 
Datatype detail

real_order

datatype real_order = LESS | EQUAL | GREATER | UNORDERED


nan_mode

datatype nan_mode = QUIET | SIGNALLING


float_class

datatype float_class = NAN of nan_mode | INF | ZERO | NORMAL | SUBNORMAL


rounding_mode

datatype rounding_mode = TO_NEAREST | TO_NEGINF | TO_POSINF | TO_ZERO

 
DataConstructor detail

LESS

constructor LESS : real_order


EQUAL

constructor EQUAL : real_order


GREATER

constructor GREATER : real_order


UNORDERED

constructor UNORDERED : real_order


QUIET

constructor QUIET : nan_mode


SIGNALLING

constructor SIGNALLING : nan_mode


NAN

constructor NAN : nan_mode -> float_class


INF

constructor INF : float_class


ZERO

constructor ZERO : float_class


NORMAL

constructor NORMAL : float_class


SUBNORMAL

constructor SUBNORMAL : float_class


TO_NEAREST

constructor TO_NEAREST : rounding_mode


TO_NEGINF

constructor TO_NEGINF : rounding_mode


TO_POSINF

constructor TO_POSINF : rounding_mode


TO_ZERO

constructor TO_ZERO : rounding_mode

 
Value detail

setRoundingMode

val setRoundingMode : rounding_mode -> unit


getRoundingMode

val getRoundingMode : unit -> rounding_mode


toString

val toString : decimal_approx -> string


fromString

val fromString : string -> decimal_approx option


scan

val scan : (char, 'a) StringCvt.reader -> (decimal_approx, 'a) StringCvt.reader

 
Exception detail

Unordered

exception Unordered


Overview  Index  Help 
Standard ML Basis Library

This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.

Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.

Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order, please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).