Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] View of /src/common/fp.sml
ViewVC logotype

View of /src/common/fp.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (download) (annotate)
Thu Mar 13 14:29:38 2008 UTC (11 years, 8 months ago) by jhr
File size: 616 byte(s)
  Merged math library into common; fixed type errors in ONB code
(* fp.sml
 *
 * COPYRIGHT (c) 2006 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

signature FP =
  sig

    type float = Real32.real
    type double = Real64.real

    val ftod : float -> double
    val itod : Int32.int -> double

    val itof : Int32.int -> float

    val dtof : double -> float

  end

structure FP :> FP =
  struct

    type float = Real32.real
    type double = Real64.real

    val ftod = Real32.toLarge
    val itod = Real64.fromLargeInt o Int32.toLarge

    val itof = Real32.fromLargeInt o Int32.toLarge

    val dtof = Real32.fromLarge IEEEReal.TO_NEAREST

  end

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