Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8830ac37d7
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (26 sloc) 0.581 kb
(in-package #:vacietis.libc.math.h)
(in-readtable vacietis)
(define HUGE_VAL most-positive-double-float)
(defun/1 atan2 (x y)
(atan x y))
(defun/1 pow (x y)
(expt x y))
(defun/1 log10 (x)
(log x 10))
(defun/1 fabs (x)
(abs x))
(defun/1 ceil (x)
(ceiling x))
(defun/1 fmod (x y)
(mod x y))
(defun/1 modf (x ptr)
(multiple-value-bind (whole part)
(fround x)
(setf (deref* ptr) whole)
(defun/1 ldexp (x n)
(* x (expt 2 n)))
(defun/1 frexp (x nptr)
(let ((n (ceiling (log (abs x) 2))))
(setf (deref* nptr) n)
(/ x (expt 2 n))))
Jump to Line
Something went wrong with that request. Please try again.