Revision: 53482
http://brlcad.svn.sourceforge.net/brlcad/?rev=53482&view=rev
Author: brlcad
Date: 2012-11-07 03:13:54 +0000 (Wed, 07 Nov 2012)
Log Message:
-----------
implement routines to also calculate the sqrt() of the min/max for floats and
doubles.
Modified Paths:
--------------
brlcad/trunk/src/libbn/ulp.c
Modified: brlcad/trunk/src/libbn/ulp.c
===================================================================
--- brlcad/trunk/src/libbn/ulp.c 2012-11-07 02:55:23 UTC (rev 53481)
+++ brlcad/trunk/src/libbn/ulp.c 2012-11-07 03:13:54 UTC (rev 53482)
@@ -24,7 +24,7 @@
* Place (ULP).
*
* In this context, ULP is the distance to the next normalized
- * floating point value larger that a given input value.
+ * floating point value larger than a given input value.
*
* TODO: handle NaN, +-Inf, underflow, overflow, non-IEEE, float.h
*
@@ -113,6 +113,34 @@
double
+bn_flt_min_sqrt()
+{
+ return sqrt(flt_min());
+}
+
+
+double
+bn_flt_max_sqrt()
+{
+ return sqrt(flt_max());
+}
+
+
+double
+bn_dbl_min_sqrt()
+{
+ return sqrt(dbl_min());
+}
+
+
+double
+bn_dbl_max_sqrt()
+{
+ return sqrt(dbl_max());
+}
+
+
+double
bn_ulp(double val)
{
double next;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits