caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] YAFPFR: Yet another floating point feature request
@ 2001-10-08 16:21 Thorsten Ohl
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Ohl @ 2001-10-08 16:21 UTC (permalink / raw)
  To: caml-list

The C library header file <float.h> contains (among others) the
following useful macros:

   /* Number of decimal digits of precision in a double */
#define DBL_DIG 15
   /* Difference between 1.0 and the minimum double greater than 1.0 */
#define DBL_EPSILON 2.2204460492503131e-16
   /* Minimum normalised double */
#define DBL_MIN 2.2250738585072014e-308
   /* Minimum int x such that 10**x is a normalised double */
#define DBL_MIN_10_EXP (-307)
   /* Maximum double */
#define DBL_MAX 1.7976931348623157e+308
   /* Maximum int x such that 10**x is a representable double */
#define DBL_MAX_10_EXP 308

It would be great if these values were accessible from O'Caml in a
future version so that numerical code could be made to work on
different machines.

Merci,
-Thorsten
-- 
Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de
http://heplix.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] YAFPFR: Yet another floating point feature request
       [not found] <200110081621.f98GLt931245@heplix4.ikp.physik.tu-darmstadt. de>
@ 2001-10-09 21:11 ` Chris Hecker
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Hecker @ 2001-10-09 21:11 UTC (permalink / raw)
  To: ohl, caml-list


>The C library header file <float.h> contains (among others) the
>following useful macros:
>It would be great if these values were accessible from O'Caml in a
>future version so that numerical code could be made to work on
>different machines.

I second this request (having defined a bunch in my own work).

Chris




-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-09 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-08 16:21 [Caml-list] YAFPFR: Yet another floating point feature request Thorsten Ohl
     [not found] <200110081621.f98GLt931245@heplix4.ikp.physik.tu-darmstadt. de>
2001-10-09 21:11 ` Chris Hecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).