* Copyright (c) 1985 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* @(#)Kexpf.s 7.1 (Berkeley) 12/6/90
#include "../tahoe/SYS.h"
movl r0,-88(fp) # (int)ent from Kfloorf
callf $24,_Ksubd # (arg - ent)
ldd r0; std -60(fp) # fract
ldd r0; std -84(fp) # xsq
ldd -60(fp); pushd # fract
ldd r0; std -68(fp) # temp1
ldd r0; std -76(fp) # temp2
pushl 20(fp) # hfs for Kldexpf
pushl 20(fp) # hfs tor temp2+temp1
ldd -68(fp); pushd # temp1
ldd -76(fp); pushd # temp2
ldd r0; pushd # temp2+temp1
ldd r0; std r2 # sqrt2*(temp2+temp1)
callf $24,_Ksubd # temp2-temp1
L19: .long 0x40800000, 0x00000000 # .double 1
tstl 4(fp) # if (d<0.0) {
movl r0,-60(fp) # fract = modf(d,&d);
tstl r0 # if (fract != 0.0)
cvdl r0 # for Kexpf call only!
_p0: .long 0x45BD3D04, 0x7F734DBD # .double 1513.9067990543389
_p1: .long 0x42A19DD4, 0x989F60DA # .double 20.202065651286927
_p2: .long 0x3DBD2E42, 0xAB70BDA9 # .double .023093347753750233
_q0: .long 0x468881B1, 0x7C3A6529 # .double 4368.2116627275583
_q1: .long 0x44692F28, 0x7AE89541 # .double 233.18421142748162
_q2: .long 0x40800000, 0x00000000 # .double 1
_log2e: .long 0x40B8AA3B, 0x295C17F0 # .double 1.4426950408889634
_sqrt2: .long 0x40B504F3, 0x33F9DE64 # .double 1.414213562373095
_maxf: .long 0x471C4000, 0x00000000 # .double 10000
_HUGE: .long 0x7FFFFFFE, 0xFFFFFFFC # .double 1.701411733192644e+38
one: .long 0x40800000 # .float 1
half: .long 0x40000000, 0x00000000 # .double .5