1 /* 2 * Written by J.T. Conklin <jtc (at) NetBSD.org>. 3 * Public domain. 4 */ 5 6 #include <machine/asm.h> 7 8 #include "abi.h" 9 10 RCSID("$NetBSD: s_log1p.S,v 1.10 2003/07/26 19:25:02 salo Exp $") 11 12 /* 13 * Since the fyl2xp1 instruction has such a limited range: 14 * -(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1 15 * it's not worth trying to use it. 16 */ 17 18 ENTRY(log1p) 19 XMM_ONE_ARG_DOUBLE_PROLOGUE 20 fldln2 21 fldl ARG_DOUBLE_ONE 22 fld1 23 faddp 24 fyl2x 25 XMM_DOUBLE_EPILOGUE 26 ret 27