projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Lua bindings for RegionMap and region list
[ardour.git]
/
libs
/
pbd
/
pbd
/
fastlog.h
diff --git
a/libs/pbd/pbd/fastlog.h
b/libs/pbd/pbd/fastlog.h
index f64ad996cf2079116f2a7a99b90003a213bdf554..80b02e95224893dd7cfe8f413dd5ab977c88fb4f 100644
(file)
--- a/
libs/pbd/pbd/fastlog.h
+++ b/
libs/pbd/pbd/fastlog.h
@@
-10,6
+10,8
@@
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#include <math.h> /* for HUGE_VAL */
#include <math.h> /* for HUGE_VAL */
+#include "pbd/libpbd_visibility.h"
+
static inline float fast_log2 (float val)
{
/* don't use reinterpret_cast<> because that prevents this
static inline float fast_log2 (float val)
{
/* don't use reinterpret_cast<> because that prevents this
@@
-23,9
+25,9
@@
static inline float fast_log2 (float val)
x &= ~(255 << 23);
x += 127 << 23;
*exp_ptr = x;
x &= ~(255 << 23);
x += 127 << 23;
*exp_ptr = x;
-
+
val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3;
val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3;
-
+
return (val + log_2);
}
return (val + log_2);
}