| 1 | (* Copyright (C) 2009 Matthew Fluet. |
| 2 | * Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh |
| 3 | * Jagannathan, and Stephen Weeks. |
| 4 | * |
| 5 | * MLton is released under a BSD-style license. |
| 6 | * See the file MLton-LICENSE for details. |
| 7 | *) |
| 8 | |
| 9 | signature REAL_X_STRUCTS = |
| 10 | sig |
| 11 | structure RealSize: REAL_SIZE |
| 12 | structure WordX: WORD_X |
| 13 | end |
| 14 | |
| 15 | signature REAL_X = |
| 16 | sig |
| 17 | include REAL_X_STRUCTS |
| 18 | |
| 19 | (* reals of all RealSize.t sizes. *) |
| 20 | type t |
| 21 | |
| 22 | datatype decon = |
| 23 | NAN |
| 24 | | ZERO of {signBit: bool} |
| 25 | | ONE of {signBit: bool} |
| 26 | | POW2 of {signBit: bool, exp: int} (* man = 0.5 *) |
| 27 | | FIN of {signBit: bool, exp: int, man: t} |
| 28 | | INF of {signBit: bool} |
| 29 | |
| 30 | val abs: t -> t option |
| 31 | val acos: t -> t option |
| 32 | val add: t * t -> t option |
| 33 | val asin: t -> t option |
| 34 | val atan2: t * t -> t option |
| 35 | val atan: t -> t option |
| 36 | val castFromWord: WordX.t -> t option |
| 37 | val castToWord: t -> WordX.t option |
| 38 | val cos: t -> t option |
| 39 | val decon: t -> decon option |
| 40 | val div: t * t -> t option |
| 41 | val equal: t * t -> bool option |
| 42 | val equals: t * t -> bool |
| 43 | val exp: t -> t option |
| 44 | val fromIntInf: IntInf.t * RealSize.t -> t option |
| 45 | val hash: t -> word |
| 46 | val layout: t -> Layout.t |
| 47 | val le: t * t -> bool option |
| 48 | val ln: t -> t option |
| 49 | val log10: t -> t option |
| 50 | val lt: t * t -> bool option |
| 51 | val make: string * RealSize.t -> t option |
| 52 | val mul: t * t -> t option |
| 53 | val muladd: t * t * t -> t option |
| 54 | val mulsub: t * t * t -> t option |
| 55 | val neg: t -> t option |
| 56 | val qequal: t * t -> bool option |
| 57 | val sin: t -> t option |
| 58 | val size: t -> RealSize.t |
| 59 | val sqrt: t -> t option |
| 60 | val sub: t * t -> t option |
| 61 | val tan: t -> t option |
| 62 | val toString: t -> string |
| 63 | val zero: RealSize.t -> t |
| 64 | end |