AROSAmiga Research OS

Previous Next Top of Manual blank.gif

AROS - The Amiga Research OS


Documentation
    AutoDocs
        Exec.library
        MathFFP.library
        MathIEEEDoubleBase
        MathIEEEDoubleTrans
        MathIEEESingleBase
        MathIEEESingleTrans
            IEEESPSincos
            IEEESPPow
            IEEESPAcos
            IEEESPCosh
            IEEESPCos
            IEEESPSqrt
            IEEESPSinh
            IEEESPFieee
            IEEESPLog10
            IEEESPSin
            IEEESPTan
            IEEESPTieee
            IEEESPLog
            IEEESPExp
            IEEESPAsin
            IEEESPTanh
            IEEESPAtan
        MathTrans
NAME
#include <aros/libcall.h>
#include <proto/mathieeesingbas.h>
#include <proto/mathieeesingtrans.h>
#include <proto/exec.h>
#include <exec/types.h>
#include <libraries/mathieeesp.h>

float IEEESPLog10 ()

SYNOPSIS
float y

FUNCTION
Calculate logarithm (base 10) of the given IEEE single precision number
INPUTS
y
IEEE single precision floating point number

RESULT
IEEE single precision number flags: zero : result is zero negative : result is negative overflow : argument was negative
NOTES
EXAMPLE

BUGS
SEE ALSO
MathIEEESingleTrans

INTERNALS
ALGORITHM: If the Argument is negative set overflow-flag and return 0. If the Argument is 0 return 0xffffffff. All other cases: (ld is the logarithm with base 2) (ln is the logarithm with base e) y = M * 2^E
ln y = ln ( M * 2^E ) =

= ln M + ln 2^E =

= ln M + E * ln (2) =

ld M        ld 2
= ----- + E * ----- =      [ld 2 = 1]
ld 10       ld 10

ld M + E
= --------
ld 10
ld 10 can be precalculated, of course. For calculating ld M see file intern_ieeespld.c


Previous Next Top of Manual blank.gif
minilogo.gif

Amiga® is a trademark of Amiga Inc. All other trademarks belong to their respective owners.

Copyright © AROS - The Amiga Research OS
All Rights Reserved
Comments to webmaster: digulla@aros.org
Generated: Tue Sep 4, 2001