Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /MLRISC/releases/release-110.84/library/fixed-point.sig
ViewVC logotype

Annotation of /MLRISC/releases/release-110.84/library/fixed-point.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 411 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/MLRISC/library/fixed-point.sig

1 : monnier 411 (*
2 :     * A simple fixed point datatype
3 :     *
4 :     * -- Allen
5 :     *)
6 :    
7 : monnier 245 signature FIXED_POINT =
8 :     sig
9 : monnier 411 type fixed_point = Word31.word
10 : monnier 245
11 :     val fixed_point : int * int -> fixed_point
12 :    
13 :     val zero : fixed_point
14 :     val one : fixed_point
15 :    
16 :     val compare : fixed_point * fixed_point -> order
17 :    
18 :     val * : fixed_point * fixed_point -> fixed_point
19 :     val / : fixed_point * fixed_point -> fixed_point
20 :     val scale : fixed_point * int -> fixed_point
21 :     val div : fixed_point * int -> fixed_point
22 :     val min : fixed_point * fixed_point -> fixed_point
23 :     val max : fixed_point * fixed_point -> fixed_point
24 :    
25 :     val toString : fixed_point -> string
26 :     val toReal : fixed_point -> real
27 :     val toWord : fixed_point -> word
28 :     val fromReal : real -> fixed_point
29 :     val fromInt : int -> fixed_point
30 :     end
31 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0