fp_log.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
- /*
- fp_trig.c: floating-point math routines for the Linux-m68k
- floating point emulator.
- Copyright (c) 1998-1999 David Huggins-Daines / Roman Zippel.
- I hereby give permission, free of charge, to copy, modify, and
- redistribute this software, in source or binary form, provided that
- the above copyright notice and the following disclaimer are included
- in all such copies.
- THIS SOFTWARE IS PROVIDED "AS IS", WITH ABSOLUTELY NO WARRANTY, REAL
- OR IMPLIED.
- */
- #include "fp_emu.h"
- struct fp_ext *
- fp_fsqrt(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("fsqrtn");
- fp_monadic_check(dest, src);
- if (IS_ZERO(dest))
- return dest;
- if (dest->sign) {
- fp_set_nan(dest);
- return dest;
- }
- if (IS_INF(dest))
- return dest;
- return dest;
- }
- struct fp_ext *
- fp_fetoxm1(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("fetoxm1n");
- fp_monadic_check(dest, src);
- if (IS_ZERO(dest))
- return dest;
- return dest;
- }
- struct fp_ext *
- fp_fetox(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("fetoxn");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_ftwotox(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("ftwotoxn");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_ftentox(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("ftentoxn");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_flogn(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("flognn");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_flognp1(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("flognp1n");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_flog10(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("flog10n");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_flog2(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("flog2n");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_fgetexp(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("fgetexpn");
- fp_monadic_check(dest, src);
- return dest;
- }
- struct fp_ext *
- fp_fgetman(struct fp_ext *dest, struct fp_ext *src)
- {
- uprint("fgetmann");
- fp_monadic_check(dest, src);
- return dest;
- }