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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (as text) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 6 months ago) by monnier
Original Path: sml/trunk/src/MLRISC/library/fixed-point.sig
File size: 819 byte(s)
bring revisions from the vendor branch to the trunk
(* 
 * A simple fixed point datatype
 * 
 * -- Allen
 *)

signature FIXED_POINT =
sig
   type fixed_point = Word31.word

   val fixed_point  : int * int -> fixed_point

   val zero     : fixed_point
   val one      : fixed_point

   val compare  : fixed_point * fixed_point -> order

   val *        : fixed_point * fixed_point -> fixed_point
   val /        : fixed_point * fixed_point -> fixed_point
   val scale    : fixed_point * int -> fixed_point
   val div      : fixed_point * int -> fixed_point
   val min      : fixed_point * fixed_point -> fixed_point
   val max      : fixed_point * fixed_point -> fixed_point

   val toString : fixed_point -> string
   val toReal   : fixed_point -> real
   val toWord   : fixed_point -> word
   val fromReal : real -> fixed_point
   val fromInt  : int -> fixed_point
end


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