Autoconfiscate log2f.

Android doesn't supply log2f for us (though it does have all the other
float calls ruamoko wants).
This commit is contained in:
Bill Currie 2012-02-05 14:23:33 +09:00
parent 5fdad1c79c
commit 3bd75cefd8
2 changed files with 12 additions and 0 deletions

View file

@ -95,7 +95,11 @@ bi_log (progs_t *pr)
static void
bi_log2 (progs_t *pr)
{
#ifdef HAVE_LOG2F
R_FLOAT (pr) = log2f (P_FLOAT (pr, 0));
#else
R_FLOAT (pr) = logf (P_FLOAT (pr, 0)) / M_LOG2E;
#endif
}
static void