forked from KolibriOS/kolibrios
e08c6968ef
git-svn-id: svn://kolibrios.org@9558 a494cfbc-eb01-0410-851d-a64ba20cac60
19 lines
274 B
NASM
19 lines
274 B
NASM
|
|
format ELF
|
|
include '../proc32.inc'
|
|
section '.text' executable
|
|
|
|
public log_ as "log"
|
|
|
|
log_:
|
|
|
|
; ln(x) = lg(x)/lg(e).
|
|
|
|
fld qword[esp+4]
|
|
fld1
|
|
fxch
|
|
fyl2x ;Compute 1*lg(x).
|
|
fldl2e ;Load lg(e).
|
|
fdivp st1, st0 ;Compute lg(x)/lg(e).
|
|
ret
|