;* Copyright (C) 1994-2010 INRIA
;*
;* This program is free software; you can redistribute it and/or modify
;* it under the terms of the GNU General Public License as published by
;* the Free Software Foundation; version 2 of the License.
;*
;* This program is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;* GNU General Public License for more details.

(module __caml_bfloat
		(extern (format_float::obj (obj obj) "format_float"))
		(export (inline int_of_float x)
				(inline float_of_int x)
				(inline ~float x)
				(inline +float x y)
				(inline -float x y)
				(inline *float x y)
				(inline /float x y)
				(inline =float x y)
				(inline <>float x y)
				(inline <float x y)
				(inline >float x y)
				(inline <=float x y)
				(inline >=float x y)
				(inline exp_float x)
				(inline log_float x)
				(inline sqrt_float x)
				(inline power_float x y)
				(inline sin_float x)
				(inline cos_float x)
				(inline tan_float x)
				(inline asin_float x)
				(inline acos_float x)
				(inline atan_float x)
				(inline atan2_float x y)
				(inline float_of_string x)))

;*---------------------------------------------------------------------*/
;*    int_of_float ...                                                 */
;*---------------------------------------------------------------------*/
(define-inline (int_of_float x)
   (flonum->fixnum x))

;*---------------------------------------------------------------------*/
;*    float_of_int ...                                                 */
;*---------------------------------------------------------------------*/
(define-inline (float_of_int x)
   (fixnum->flonum x))

;*---------------------------------------------------------------------*/
 ;*    ~float ...                                                      */
;*---------------------------------------------------------------------*/
(define-inline (~float x)
   (negfl x))

;*---------------------------------------------------------------------*/
;*    +float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (+float x y)
   (+fl x y))

;*---------------------------------------------------------------------*/
;*    -float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (-float x y)
   (-fl x y))

;*---------------------------------------------------------------------*/
;*    *float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (*float x y)
   (*fl x y))

;*---------------------------------------------------------------------*/
;*    /float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (/float x y)
   (/fl x y))

;*---------------------------------------------------------------------*/
;*    =float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (=float x y)
   (=fl x y))

;*---------------------------------------------------------------------*/
;*    <>float ...                                                      */
;*---------------------------------------------------------------------*/
(define-inline (<>float x y)
   (not (=fl x y)))

;*---------------------------------------------------------------------*/
;*    =<float ...                                                      */
;*---------------------------------------------------------------------*/
(define-inline (<float x y)
   (<fl x y))

;*---------------------------------------------------------------------*/
;*    >float ...                                                       */
;*---------------------------------------------------------------------*/
(define-inline (>float x y)
   (>fl x y))

;*---------------------------------------------------------------------*/
;*    <=float ...                                                      */
;*---------------------------------------------------------------------*/
(define-inline (<=float x y)
   (<=fl x y))

;*---------------------------------------------------------------------*/
;*    >=float ...                                                      */
;*---------------------------------------------------------------------*/
(define-inline (>=float x y)
   (>=fl x y))

;*---------------------------------------------------------------------*/
;*    exp_float ...                                                    */
;*---------------------------------------------------------------------*/
(define-inline (exp_float x)
   (expfl x))

;*---------------------------------------------------------------------*/
;*    log_float ...                                                    */
;*---------------------------------------------------------------------*/
(define-inline (log_float x)
   (logfl x))

;*---------------------------------------------------------------------*/
;*    sqrt_float ...                                                   */
;*---------------------------------------------------------------------*/
(define-inline (sqrt_float x)
   (sqrtfl x))

;*---------------------------------------------------------------------*/
;*    power_float ...                                                  */
;*---------------------------------------------------------------------*/
(define-inline (power_float x y)
   (exptfl x y))

;*---------------------------------------------------------------------*/
;*    sin_float ...                                                    */
;*---------------------------------------------------------------------*/
(define-inline (sin_float x)
   (sinfl x))

;*---------------------------------------------------------------------*/
;*    cos_float ...                                                    */
;*---------------------------------------------------------------------*/
(define-inline (cos_float x)
   (cosfl x))

;*---------------------------------------------------------------------*/
;*    tan_float ...                                                    */
;*---------------------------------------------------------------------*/
(define-inline (tan_float x)
   (tanfl x))

;*---------------------------------------------------------------------*/
;*    asin_float ...                                                   */
;*---------------------------------------------------------------------*/
(define-inline (asin_float x)
   (asinfl x))

;*---------------------------------------------------------------------*/
;*    acos_float ...                                                   */
;*---------------------------------------------------------------------*/
(define-inline (acos_float x)
   (acosfl x))

;*---------------------------------------------------------------------*/
;*    atan_float ...                                                   */
;*---------------------------------------------------------------------*/
(define-inline (atan_float x)
   (c-atan x))

;*---------------------------------------------------------------------*/
;*    atan_float ...                                                   */
;*---------------------------------------------------------------------*/
(define-inline (atan2_float x y)
   (c-atan2 x y))

;*---------------------------------------------------------------------*/
;*    float_of_string ...                                              */
;*---------------------------------------------------------------------*/
(define-inline (float_of_string x)
   (string->real x))



   

