Commit 44badc70 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Upgrade libm."

parents e1a124e5 a0ee0782
......@@ -87,6 +87,8 @@ typedef unsigned long __psize_t;
/* Standard system types */
typedef int __clock_t;
typedef int __clockid_t;
typedef double __double_t;
typedef float __float_t;
typedef long __ptrdiff_t;
typedef int __time_t;
typedef int __timer_t;
......
......@@ -87,6 +87,8 @@ typedef unsigned long __psize_t;
/* Standard system types */
typedef int __clock_t;
typedef int __clockid_t;
typedef double __double_t;
typedef float __float_t;
typedef long __ptrdiff_t;
typedef int __time_t;
typedef int __timer_t;
......
......@@ -177,6 +177,8 @@
#define __unused /* delete */
#endif
#define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */
#if __GNUC_PREREQ__(3, 1)
#define __used __attribute__((__used__))
#else
......@@ -313,6 +315,12 @@
#define __purefunc
#endif
#if __GNUC_PREREQ__(3, 1)
#define __always_inline __attribute__((__always_inline__))
#else
#define __always_inline
#endif
/*
* Macros for manipulating "link sets". Link sets are arrays of pointers
* to objects, which are gathered up by the linker.
......@@ -510,4 +518,11 @@
#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
#endif
/* Android-added: for FreeBSD's libm. */
#define __weak_reference(sym,alias) \
__asm__(".weak " #alias); \
__asm__(".equ " #alias ", " #sym)
#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
#endif /* !_SYS_CDEFS_H_ */
#!/usr/bin/python
import glob
import os
import re
import string
import subprocess
import sys
toolchain = os.environ['ANDROID_TOOLCHAIN']
arch = re.sub(r'.*/linux-x86/([^/]+)/.*', r'\1', toolchain)
sys.stderr.write('Checking symbols for arch "%s"...\n' % arch)
def GetSymbols(library, functions_or_variables):
api = '9'
if library == 'libm' and arch == 'arm':
api = '3'
path = '%s/development/ndk/platforms/android-%s/arch-%s/symbols/%s.so.%s.txt' % (os.environ['ANDROID_BUILD_TOP'], api, arch, library, functions_or_variables)
symbols = set()
for line in open(path, 'r'):
symbols.add(line.rstrip())
#sys.stdout.write('%d %s in %s for %s\n' % (len(symbols), functions_or_variables, library, arch))
return symbols
def CheckSymbols(library, functions_or_variables):
expected_symbols = GetSymbols(library, functions_or_variables)
so_file = '%s/system/lib/%s.so' % (os.environ['ANDROID_PRODUCT_OUT'], library)
# Example readelf output:
# 264: 0001623c 4 FUNC GLOBAL DEFAULT 8 cabsf
# 266: 00016244 4 FUNC GLOBAL DEFAULT 8 dremf
# 267: 00019018 4 OBJECT GLOBAL DEFAULT 11 __fe_dfl_env
# 268: 00000000 0 FUNC GLOBAL DEFAULT UND __aeabi_dcmplt
r = re.compile(r' +\d+: [0-9a-f]+ +\d+ (FUNC|OBJECT) +\S+ +\S+ +\d+ (\S+)')
actual_symbols = set()
for line in subprocess.check_output(['readelf', '--dyn-syms', so_file]).split('\n'):
m = r.match(line)
if m:
if m.group(1) == 'FUNC' and functions_or_variables == 'functions':
actual_symbols.add(m.group(2))
elif m.group(1) == 'OBJECT' and functions_or_variables == 'variables':
actual_symbols.add(m.group(2))
#else:
#print 'ignoring: ' % line
missing = expected_symbols - actual_symbols
if len(missing) > 0:
sys.stderr.write('%d missing %s in %s for %s:\n' % (len(missing), functions_or_variables, library, arch))
for miss in sorted(missing):
sys.stderr.write(' %s\n' % miss)
return len(missing) == 0
CheckSymbols("libc", "functions")
CheckSymbols("libc", "variables")
CheckSymbols("libm", "functions")
CheckSymbols("libm", "variables")
sys.exit(0)
LOCAL_PATH:= $(call my-dir)
libm_common_src_files:= \
isinf.c \
fpclassify.c \
sincos.c \
bsdsrc/b_exp.c \
bsdsrc/b_log.c \
bsdsrc/b_tgamma.c \
src/e_acos.c \
src/e_acosf.c \
src/e_acosh.c \
src/e_acoshf.c \
src/e_asin.c \
src/e_asinf.c \
src/e_atan2.c \
src/e_atan2f.c \
src/e_atanh.c \
src/e_atanhf.c \
src/e_cosh.c \
src/e_coshf.c \
src/e_exp.c \
src/e_expf.c \
src/e_fmod.c \
src/e_fmodf.c \
src/e_gamma.c \
src/e_gamma_r.c \
src/e_gammaf.c \
src/e_gammaf_r.c \
src/e_hypot.c \
src/e_hypotf.c \
src/e_j0.c \
src/e_j0f.c \
src/e_j1.c \
src/e_j1f.c \
src/e_jn.c \
src/e_jnf.c \
src/e_lgamma.c \
src/e_lgamma_r.c \
src/e_lgammaf.c \
src/e_lgammaf_r.c \
src/e_log.c \
src/e_log10.c \
src/e_log10f.c \
src/e_logf.c \
src/e_pow.c \
src/e_powf.c \
src/e_rem_pio2.c \
src/e_rem_pio2f.c \
src/e_remainder.c \
src/e_remainderf.c \
src/e_scalb.c \
src/e_scalbf.c \
src/e_sinh.c \
src/e_sinhf.c \
src/e_sqrt.c \
src/k_cos.c \
src/k_cosf.c \
src/k_rem_pio2.c \
src/k_sin.c \
src/k_sinf.c \
src/k_tan.c \
src/k_tanf.c \
src/s_asinh.c \
src/s_asinhf.c \
src/s_atan.c \
src/s_atanf.c \
src/s_cbrt.c \
src/s_cbrtf.c \
src/s_ceil.c \
src/s_ceilf.c \
src/s_ceill.c \
src/s_copysign.c \
src/s_copysignf.c \
src/s_cos.c \
src/s_cosf.c \
src/s_erf.c \
src/s_erff.c \
src/s_exp2.c \
src/s_exp2f.c \
src/s_expm1.c \
src/s_expm1f.c \
src/s_fabsf.c \
src/s_fdim.c \
src/s_finite.c \
src/s_finitef.c \
src/s_floor.c \
src/s_floorf.c \
src/s_floorl.c \
src/s_fma.c \
src/s_fmaf.c \
src/s_fmax.c \
src/s_fmaxf.c \
src/s_fmaxl.c \
src/s_fmin.c \
src/s_fminf.c \
src/s_fminl.c \
src/s_frexpf.c \
src/s_ilogb.c \
src/s_ilogbf.c \
src/s_ilogbl.c \
src/s_isfinite.c \
src/s_isnormal.c \
src/s_llrint.c \
src/s_llrintf.c \
src/s_llround.c \
src/s_llroundf.c \
src/s_llroundl.c \
src/s_log1p.c \
src/s_log1pf.c \
src/s_logb.c \
src/s_logbf.c \
src/s_lrint.c \
src/s_lrintf.c \
src/s_lround.c \
src/s_lroundf.c \
src/s_lroundl.c \
src/s_modff.c \
src/s_nan.c \
src/s_nearbyint.c \
src/s_nextafter.c \
src/s_nextafterf.c \
src/s_nexttowardf.c \
src/s_remquo.c \
src/s_remquof.c \
src/s_rint.c \
src/s_rintf.c \
src/s_round.c \
src/s_roundf.c \
src/s_roundl.c \
src/s_signbit.c \
src/s_signgam.c \
src/s_significand.c \
src/s_significandf.c \
src/s_sin.c \
src/s_sinf.c \
src/s_tan.c \
src/s_tanf.c \
src/s_tanh.c \
src/s_tanhf.c \
src/s_tgammaf.c \
src/s_trunc.c \
src/s_truncf.c \
src/s_truncl.c \
src/w_drem.c \
src/w_dremf.c \
src/s_copysignl.c \
src/s_fabsl.c \
src/s_fabs.c \
src/s_frexp.c \
src/s_isnan.c \
src/s_modf.c
libm_common_cflags :=
ifeq ($(TARGET_ARCH),arm)
libm_common_src_files += \
arm/fenv.c \
src/e_ldexpf.c \
src/s_scalbln.c \
src/s_scalbn.c \
src/s_scalbnf.c \
src/e_sqrtf.c
libm_common_includes = $(LOCAL_PATH)/arm
endif
ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86)
libm_common_src_files += \
i387/fenv.c \
i387/s_scalbnl.S \
i387/s_scalbn.S \
i387/s_scalbnf.S \
i387/e_sqrtf.S
libm_common_includes = $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387
endif
ifeq ($(TARGET_ARCH),mips)
libm_common_src_files += \
mips/fenv.c \
src/e_ldexpf.c \
src/s_scalbln.c \
src/s_scalbn.c \
src/s_scalbnf.c \
src/e_sqrtf.c
libm_common_includes = $(LOCAL_PATH)/mips
# Need to build *rint* functions
libm_common_cflags += -fno-builtin-rintf -fno-builtin-rint
endif
# libm.a
# ========================================================
# TODO: these come from from upstream's libc, not libm!
libm_common_src_files := \
digittoint.c \
fpclassify.c \
isinf.c \
# TODO: this is not in the BSDs.
libm_common_src_files += \
sincos.c \
libm_common_src_files += \
upstream-freebsd/lib/msun/bsdsrc/b_exp.c \
upstream-freebsd/lib/msun/bsdsrc/b_log.c \
upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \
upstream-freebsd/lib/msun/src/e_acos.c \
upstream-freebsd/lib/msun/src/e_acosf.c \
upstream-freebsd/lib/msun/src/e_acosh.c \
upstream-freebsd/lib/msun/src/e_acoshf.c \
upstream-freebsd/lib/msun/src/e_asin.c \
upstream-freebsd/lib/msun/src/e_asinf.c \
upstream-freebsd/lib/msun/src/e_atan2.c \
upstream-freebsd/lib/msun/src/e_atan2f.c \
upstream-freebsd/lib/msun/src/e_atanh.c \
upstream-freebsd/lib/msun/src/e_atanhf.c \
upstream-freebsd/lib/msun/src/e_cosh.c \
upstream-freebsd/lib/msun/src/e_coshf.c \
upstream-freebsd/lib/msun/src/e_exp.c \
upstream-freebsd/lib/msun/src/e_expf.c \
upstream-freebsd/lib/msun/src/e_fmod.c \
upstream-freebsd/lib/msun/src/e_fmodf.c \
upstream-freebsd/lib/msun/src/e_gamma.c \
upstream-freebsd/lib/msun/src/e_gammaf.c \
upstream-freebsd/lib/msun/src/e_gammaf_r.c \
upstream-freebsd/lib/msun/src/e_gamma_r.c \
upstream-freebsd/lib/msun/src/e_hypot.c \
upstream-freebsd/lib/msun/src/e_hypotf.c \
upstream-freebsd/lib/msun/src/e_j0.c \
upstream-freebsd/lib/msun/src/e_j0f.c \
upstream-freebsd/lib/msun/src/e_j1.c \
upstream-freebsd/lib/msun/src/e_j1f.c \
upstream-freebsd/lib/msun/src/e_jn.c \
upstream-freebsd/lib/msun/src/e_jnf.c \
upstream-freebsd/lib/msun/src/e_lgamma.c \
upstream-freebsd/lib/msun/src/e_lgammaf.c \
upstream-freebsd/lib/msun/src/e_lgammaf_r.c \
upstream-freebsd/lib/msun/src/e_lgamma_r.c \
upstream-freebsd/lib/msun/src/e_log10.c \
upstream-freebsd/lib/msun/src/e_log10f.c \
upstream-freebsd/lib/msun/src/e_log2.c \
upstream-freebsd/lib/msun/src/e_log2f.c \
upstream-freebsd/lib/msun/src/e_log.c \
upstream-freebsd/lib/msun/src/e_logf.c \
upstream-freebsd/lib/msun/src/e_pow.c \
upstream-freebsd/lib/msun/src/e_powf.c \
upstream-freebsd/lib/msun/src/e_remainder.c \
upstream-freebsd/lib/msun/src/e_remainderf.c \
upstream-freebsd/lib/msun/src/e_rem_pio2.c \
upstream-freebsd/lib/msun/src/e_rem_pio2f.c \
upstream-freebsd/lib/msun/src/e_scalb.c \
upstream-freebsd/lib/msun/src/e_scalbf.c \
upstream-freebsd/lib/msun/src/e_sinh.c \
upstream-freebsd/lib/msun/src/e_sinhf.c \
upstream-freebsd/lib/msun/src/e_sqrt.c \
upstream-freebsd/lib/msun/src/e_sqrtf.c \
upstream-freebsd/lib/msun/src/k_cos.c \
upstream-freebsd/lib/msun/src/k_cosf.c \
upstream-freebsd/lib/msun/src/k_exp.c \
upstream-freebsd/lib/msun/src/k_expf.c \
upstream-freebsd/lib/msun/src/k_rem_pio2.c \
upstream-freebsd/lib/msun/src/k_sin.c \
upstream-freebsd/lib/msun/src/k_sinf.c \
upstream-freebsd/lib/msun/src/k_tan.c \
upstream-freebsd/lib/msun/src/k_tanf.c \
upstream-freebsd/lib/msun/src/s_asinh.c \
upstream-freebsd/lib/msun/src/s_asinhf.c \
upstream-freebsd/lib/msun/src/s_atan.c \
upstream-freebsd/lib/msun/src/s_atanf.c \
upstream-freebsd/lib/msun/src/s_carg.c \
upstream-freebsd/lib/msun/src/s_cargf.c \
upstream-freebsd/lib/msun/src/s_cbrt.c \
upstream-freebsd/lib/msun/src/s_cbrtf.c \
upstream-freebsd/lib/msun/src/s_ccosh.c \
upstream-freebsd/lib/msun/src/s_ccoshf.c \
upstream-freebsd/lib/msun/src/s_ceil.c \
upstream-freebsd/lib/msun/src/s_ceilf.c \
upstream-freebsd/lib/msun/src/s_cexp.c \
upstream-freebsd/lib/msun/src/s_cexpf.c \
upstream-freebsd/lib/msun/src/s_cimag.c \
upstream-freebsd/lib/msun/src/s_cimagf.c \
upstream-freebsd/lib/msun/src/s_conj.c \
upstream-freebsd/lib/msun/src/s_conjf.c \
upstream-freebsd/lib/msun/src/s_copysign.c \
upstream-freebsd/lib/msun/src/s_copysignf.c \
upstream-freebsd/lib/msun/src/s_cos.c \
upstream-freebsd/lib/msun/src/s_cosf.c \
upstream-freebsd/lib/msun/src/s_cproj.c \
upstream-freebsd/lib/msun/src/s_cprojf.c \
upstream-freebsd/lib/msun/src/s_creal.c \
upstream-freebsd/lib/msun/src/s_crealf.c \
upstream-freebsd/lib/msun/src/s_csinh.c \
upstream-freebsd/lib/msun/src/s_csinhf.c \
upstream-freebsd/lib/msun/src/s_csqrt.c \
upstream-freebsd/lib/msun/src/s_csqrtf.c \
upstream-freebsd/lib/msun/src/s_ctanh.c \
upstream-freebsd/lib/msun/src/s_ctanhf.c \
upstream-freebsd/lib/msun/src/s_erf.c \
upstream-freebsd/lib/msun/src/s_erff.c \
upstream-freebsd/lib/msun/src/s_exp2.c \
upstream-freebsd/lib/msun/src/s_exp2f.c \
upstream-freebsd/lib/msun/src/s_expm1.c \
upstream-freebsd/lib/msun/src/s_expm1f.c \
upstream-freebsd/lib/msun/src/s_fabs.c \
upstream-freebsd/lib/msun/src/s_fabsf.c \
upstream-freebsd/lib/msun/src/s_fdim.c \
upstream-freebsd/lib/msun/src/s_finite.c \
upstream-freebsd/lib/msun/src/s_finitef.c \
upstream-freebsd/lib/msun/src/s_floor.c \
upstream-freebsd/lib/msun/src/s_floorf.c \
upstream-freebsd/lib/msun/src/s_fma.c \
upstream-freebsd/lib/msun/src/s_fmaf.c \
upstream-freebsd/lib/msun/src/s_fmax.c \
upstream-freebsd/lib/msun/src/s_fmaxf.c \
upstream-freebsd/lib/msun/src/s_fmin.c \
upstream-freebsd/lib/msun/src/s_fminf.c \
upstream-freebsd/lib/msun/src/s_frexp.c \
upstream-freebsd/lib/msun/src/s_frexpf.c \
upstream-freebsd/lib/msun/src/s_ilogb.c \
upstream-freebsd/lib/msun/src/s_ilogbf.c \
upstream-freebsd/lib/msun/src/s_isfinite.c \
upstream-freebsd/lib/msun/src/s_isnan.c \
upstream-freebsd/lib/msun/src/s_isnormal.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
upstream-freebsd/lib/msun/src/s_llround.c \
upstream-freebsd/lib/msun/src/s_llroundf.c \
upstream-freebsd/lib/msun/src/s_log1p.c \
upstream-freebsd/lib/msun/src/s_log1pf.c \
upstream-freebsd/lib/msun/src/s_logb.c \
upstream-freebsd/lib/msun/src/s_logbf.c \
upstream-freebsd/lib/msun/src/s_lrint.c \
upstream-freebsd/lib/msun/src/s_lrintf.c \
upstream-freebsd/lib/msun/src/s_lround.c \
upstream-freebsd/lib/msun/src/s_lroundf.c \
upstream-freebsd/lib/msun/src/s_modf.c \
upstream-freebsd/lib/msun/src/s_modff.c \
upstream-freebsd/lib/msun/src/s_nan.c \
upstream-freebsd/lib/msun/src/s_nearbyint.c \
upstream-freebsd/lib/msun/src/s_nextafter.c \
upstream-freebsd/lib/msun/src/s_nextafterf.c \
upstream-freebsd/lib/msun/src/s_nexttowardf.c \
upstream-freebsd/lib/msun/src/s_remquo.c \
upstream-freebsd/lib/msun/src/s_remquof.c \
upstream-freebsd/lib/msun/src/s_rint.c \
upstream-freebsd/lib/msun/src/s_rintf.c \
upstream-freebsd/lib/msun/src/s_round.c \
upstream-freebsd/lib/msun/src/s_roundf.c \
upstream-freebsd/lib/msun/src/s_scalbln.c \
upstream-freebsd/lib/msun/src/s_scalbn.c \
upstream-freebsd/lib/msun/src/s_scalbnf.c \
upstream-freebsd/lib/msun/src/s_signbit.c \
upstream-freebsd/lib/msun/src/s_signgam.c \
upstream-freebsd/lib/msun/src/s_significand.c \
upstream-freebsd/lib/msun/src/s_significandf.c \
upstream-freebsd/lib/msun/src/s_sin.c \
upstream-freebsd/lib/msun/src/s_sinf.c \
upstream-freebsd/lib/msun/src/s_tan.c \
upstream-freebsd/lib/msun/src/s_tanf.c \
upstream-freebsd/lib/msun/src/s_tanh.c \
upstream-freebsd/lib/msun/src/s_tanhf.c \
upstream-freebsd/lib/msun/src/s_tgammaf.c \
upstream-freebsd/lib/msun/src/s_trunc.c \
upstream-freebsd/lib/msun/src/s_truncf.c \
upstream-freebsd/lib/msun/src/w_cabs.c \
upstream-freebsd/lib/msun/src/w_cabsf.c \
upstream-freebsd/lib/msun/src/w_drem.c \
upstream-freebsd/lib/msun/src/w_dremf.c \
libm_common_src_files += fake_long_double.c
# TODO: on Android, "long double" is "double".
# upstream-freebsd/lib/msun/src/e_acosl.c \
# upstream-freebsd/lib/msun/src/e_asinl.c \
# upstream-freebsd/lib/msun/src/e_atan2l.c \
# upstream-freebsd/lib/msun/src/e_fmodl.c \
# upstream-freebsd/lib/msun/src/e_hypotl.c \
# upstream-freebsd/lib/msun/src/e_remainderl.c \
# upstream-freebsd/lib/msun/src/e_sqrtl.c \
# upstream-freebsd/lib/msun/src/s_atanl.c \
# upstream-freebsd/lib/msun/src/s_cbrtl.c \
# upstream-freebsd/lib/msun/src/s_ceill.c \
# upstream-freebsd/lib/msun/src/s_copysignl.c \
# upstream-freebsd/lib/msun/src/s_cosl.c \
# upstream-freebsd/lib/msun/src/s_fabsl.c \
# upstream-freebsd/lib/msun/src/s_floorl.c \
# upstream-freebsd/lib/msun/src/s_fmal.c \
# upstream-freebsd/lib/msun/src/s_fmaxl.c \
# upstream-freebsd/lib/msun/src/s_fminl.c \
# upstream-freebsd/lib/msun/src/s_frexpl.c \
# upstream-freebsd/lib/msun/src/s_ilogbl.c \
# upstream-freebsd/lib/msun/src/s_llrintl.c \
# upstream-freebsd/lib/msun/src/s_llroundl.c \
# upstream-freebsd/lib/msun/src/s_logbl.c \
# upstream-freebsd/lib/msun/src/s_lrintl.c \
# upstream-freebsd/lib/msun/src/s_lroundl.c \
# upstream-freebsd/lib/msun/src/s_modfl.c \
# upstream-freebsd/lib/msun/src/s_nextafterl.c \
# upstream-freebsd/lib/msun/src/s_nexttoward.c \
# upstream-freebsd/lib/msun/src/s_remquol.c \
# upstream-freebsd/lib/msun/src/s_rintl.c \
# upstream-freebsd/lib/msun/src/s_roundl.c \
# upstream-freebsd/lib/msun/src/s_scalbnl.c \
# upstream-freebsd/lib/msun/src/s_sinl.c \
# upstream-freebsd/lib/msun/src/s_tanl.c \
# upstream-freebsd/lib/msun/src/s_truncl.c \
# TODO: re-enable i387/e_sqrtf.S for x86, and maybe others.
libm_common_cflags := -DFLT_EVAL_METHOD=0
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
libm_arm_includes := $(LOCAL_PATH)/arm
libm_arm_src_files := arm/fenv.c
libm_x86_includes := $(LOCAL_PATH)/i386 $(LOCAL_PATH)/i387
libm_x86_src_files := i387/fenv.c
libm_mips_cflags := -fno-builtin-rintf -fno-builtin-rint
libm_mips_includes := $(LOCAL_PATH)/mips
libm_mips_src_files := mips/fenv.c
#
# libm.a for target.
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(libm_common_src_files)
LOCAL_ARM_MODE := arm
LOCAL_C_INCLUDES += $(libm_common_includes)
LOCAL_CFLAGS := $(libm_common_cflags)
LOCAL_MODULE:= libm
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_ARM_MODE := arm
LOCAL_CFLAGS := $(libm_common_cflags) $(libm_$(TARGET_ARCH)_cflags)
LOCAL_C_INCLUDES += $(libm_common_includes) $(libm_$(TARGET_ARCH)_includes)
LOCAL_SRC_FILES := $(libm_common_src_files) $(libm_$(TARGET_ARCH)_src_files)
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
include $(BUILD_STATIC_LIBRARY)
# libm.so
# ========================================================
#
# libm.so for target.
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
$(libm_common_src_files)
LOCAL_ARM_MODE := arm
LOCAL_C_INCLUDES += $(libm_common_includes)
LOCAL_CFLAGS := $(libm_common_cflags)
LOCAL_MODULE:= libm
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
LOCAL_WHOLE_STATIC_LIBRARIES := libm
include $(BUILD_SHARED_LIBRARY)
......@@ -23,18 +23,29 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libc/arm/_fpmath.h,v 1.4 2005/03/20 00:53:52 cognet Exp $
* $FreeBSD$
*/
#if defined(__VFP_FP__)
#define _IEEE_WORD_ORDER _BYTE_ORDER
#else
#define _IEEE_WORD_ORDER _BIG_ENDIAN
#endif
union IEEEl2bits {
long double e;
struct {
#ifndef __ARMEB__
#if _BYTE_ORDER == _LITTLE_ENDIAN
#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN
unsigned int manl :32;
#endif
unsigned int manh :20;
unsigned int exp :11;
unsigned int sign :1;
#else
#if _IEEE_WORD_ORDER == _BIG_ENDIAN
unsigned int manl :32;
#endif
#else /* _BYTE_ORDER == _LITTLE_ENDIAN */
unsigned int sign :1;
unsigned int exp :11;
unsigned int manh :20;
......@@ -44,9 +55,10 @@ union IEEEl2bits {
};
#define LDBL_NBIT 0
#define LDBL_IMPLICIT_NBIT
#define mask_nbit_l(u) ((void)0)
#define LDBL_MANH_SIZE 32
#define LDBL_MANH_SIZE 20
#define LDBL_MANL_SIZE 32
#define LDBL_TO_ARRAY32(u, a) do { \
......
/*-
* Copyright (c) 2007 David Schultz
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 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.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/cdefs.h>
/* digittoint is in the FreeBSD C library, but implemented in terms of locale stuff. */
__LIBC_HIDDEN__ int digittoint(char ch) {
int d = ch - '0';
if ((unsigned) d < 10) {
return d;
}
d = ch - 'a';
if ((unsigned) d < 6) {
return d + 10;
}
d = ch - 'A';
if ((unsigned) d < 6) {
return d + 10;
}
return -1;
}
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <float.h>
#include <math.h>
extern int __isinf(double); /* isinf.c */
int (isinf)(double a1) { return __isinf(a1); }
/*
* The BSD "long double" functions are broken when sizeof(long double) == sizeof(double).
* Android works around those cases by replacing the broken functions with our own trivial stubs
* that call the regular "double" function.
*/
int __fpclassifyl(long double a1) { return __fpclassifyd(a1); }
int __isfinitel(long double a1) { return __isfinite(a1); }
int __isinfl(long double a1) { return __isinf(a1); }
int __isnanl(long double a1) { return isnan(a1); }
int __isnormall(long double a1) { return __isnormal(a1); }
int __signbitl(long double a1) { return __signbit(a1); }
long double acoshl(long double a1) { return acosh(a1); }
long double asinhl(long double a1) { return asinh(a1); }
long double atanhl(long double a1) { return atanh(a1); }
long double cbrtl(long double a1) { return cbrt(a1); }
long double copysignl(long double a1, long double a2) { return copysign(a1, a2); }
long double coshl(long double a1) { return cosh(a1); }
long double erfcl(long double a1) { return erfc(a1); }
long double erfl(long double a1) { return erf(a1); }
long double expm1l(long double a1) { return expm1(a1); }
long double fabsl(long double a1) { return fabs(a1); }
long double fmaxl(long double a1, long double a2) { return fmax(a1, a2); }
long double fmodl(long double a1, long double a2) { return fmod(a1, a2); }
long double fminl(long double a1, long double a2) { return fmin(a1, a2); }
int ilogbl(long double a1) { return ilogb(a1); }
long double lgammal(long double a1) { return lgamma(a1); }
long long llrintl(long double a1) { return llrint(a1); }
long double log10l(long double a1) { return log10(a1); }
long double log1pl(long double a1) { return log1p(a1); }
long double log2l(long double a1) { return log2(a1); }
long double logl(long double a1) { return log(a1); }
long lrintl(long double a1) { return lrint(a1); }
long long llroundl(long double a1) { return llround(a1); }
long lroundl(long double a1) { return lround(a1); }
long double modfl(long double a1, long double* a2) { return modf(a1, (double*) a2); }
long double powl(long double a1, long double a2) { return pow(a1, a2); }
long double rintl(long double a1) { return rint(a1); }
long double roundl(long double a1) { return round(a1); }
long double scalbnl(long double a1, int a2) { return scalbn(a1, a2); }
long double significandl(long double a1) { return significand(a1); }
long double sinhl(long double a1) { return sinh(a1); }
long double sqrtl(long double a1) { return sqrt(a1); }
long double tanhl(long double a1) { return tanh(a1); }
long double tgammal(long double a1) { return tgamma(a1); }
......@@ -32,7 +32,7 @@
#include <math.h>
#include <stdint.h>
#include "src/fpmath.h"
#include "fpmath.h"
int
__fpclassifyf(float f)
......
......@@ -57,7 +57,7 @@ union IEEEd2bits {
unsigned int exp :11;
unsigned int sign :1;
unsigned int manl :32;
#elif __BYTE_ORDER == __LITTLE_ENDIAN
#elif __BYTE_ORDER == __LITTLE_ENDIAN
unsigned int manl :32;
unsigned int manh :20;
unsigned int exp :11;
......@@ -70,3 +70,15 @@ union IEEEd2bits {
#endif
} bits;
};
/*
* The BSD "long double" functions are broken when sizeof(long double) == sizeof(double).
* Android works around those cases by replacing the broken functions with our own trivial stubs
* that call the regular "double" function.
*/
#define __fpclassifyl __broken__fpclassify
#define __isfinitel __broken__isfinitel
#define __isinfl __broken__isinfl
#define __isnanl __broken__isnanl
#define __isnormall __broken__isnormall
#define __signbitl __broken_signbitl
......@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD: src/lib/libc/i386/_fpmath.h,v 1.5 2005/03/07 04:55:22 das Exp $
* $FreeBSD$
*/
union IEEEl2bits {
......@@ -35,6 +35,11 @@ union IEEEl2bits {
unsigned int sign :1;
unsigned int junk :16;
} bits;
struct {
unsigned long long man :64;
unsigned int expsign :16;
unsigned int junk :16;
} xbits;
};
#define LDBL_NBIT 0x80000000
......@@ -46,4 +51,4 @@ union IEEEl2bits {
#define LDBL_TO_ARRAY32(u, a) do { \
(a)[0] = (uint32_t)(u).bits.manl; \
(a)[1] = (uint32_t)(u).bits.manh; \
} while(0)
} while (0)
/*-
* Copyright (c) 2001-2011 The FreeBSD Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 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.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _COMPLEX_H
#define _COMPLEX_H
#include <sys/cdefs.h>
#ifdef __GNUC__
#if __STDC_VERSION__ < 199901
#define _Complex __complex__
#endif
#define _Complex_I ((float _Complex)1.0i)
#endif
#ifdef __generic
_Static_assert(__generic(_Complex_I, float _Complex, 1, 0),
"_Complex_I must be of type float _Complex");
#endif
#define complex _Complex
#define I _Complex_I
__BEGIN_DECLS
double cabs(double complex);
float cabsf(float complex);
long double cabsl(long double complex);
double carg(double complex);
float cargf(float complex);
long double cargl(long double complex);
double complex ccos(double complex);
float complex ccosf(float complex);
double complex ccosh(double complex);
float complex ccoshf(float complex);
double complex cexp(double complex);
float complex cexpf(float complex);
double cimag(double complex) __pure2;
float cimagf(float complex) __pure2;
long double cimagl(long double complex) __pure2;
double complex conj(double complex) __pure2;
float complex conjf(float complex) __pure2;
long double complex
conjl(long double complex) __pure2;
float complex cprojf(float complex) __pure2;
double complex cproj(double complex) __pure2;
long double complex
cprojl(long double complex) __pure2;
double creal(double complex) __pure2;
float crealf(float complex) __pure2;
long double creall(long double complex) __pure2;
double complex csin(double complex);
float complex csinf(float complex);
double complex csinh(double complex);
float complex csinhf(float complex);
double complex csqrt(double complex);
float complex csqrtf(float complex);
long double complex
csqrtl(long double complex);
double complex ctan(double complex);
float complex ctanf(float complex);
double complex ctanh(double complex);
float complex ctanhf(float complex);
__END_DECLS
#endif /* _COMPLEX_H */
......@@ -11,18 +11,16 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
* $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
* $FreeBSD$
*/
#ifndef _MATH_H_
#define _MATH_H_
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/_types.h>
#include <limits.h>
#define __pure2
/*
* ANSI/POSIX
*/
......@@ -36,37 +34,29 @@ extern const union __nan_un {
float __uf;
} __nan;
/* #if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) */
#if 1
#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __MATH_BUILTIN_CONSTANTS
#endif
/* #if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER) */
#if 1
#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
#define __MATH_BUILTIN_RELOPS
#endif
/* #ifdef __MATH_BUILTIN_CONSTANTS */
#if 1
#ifdef __MATH_BUILTIN_CONSTANTS
#define HUGE_VAL __builtin_huge_val()
#else
#define HUGE_VAL (__infinity.__ud)
#endif
/* #if __ISO_C_VISIBLE >= 1999 */
#if 0
#define FP_ILOGB0 (-__INT_MAX)
#define FP_ILOGBNAN __INT_MAX
#else
#define FP_ILOGB0 (-INT_MAX)
#define FP_ILOGBNAN INT_MAX
#endif
#if __ISO_C_VISIBLE >= 1999
#define FP_ILOGB0 (-INT_MAX) /* Android-changed */
#define FP_ILOGBNAN INT_MAX /* Android-changed */
#ifdef __MATH_BUILTIN_CONSTANTS
#define HUGE_VALF __builtin_huge_valf()
#define HUGE_VALL __builtin_huge_vall()
#define INFINITY __builtin_inf()
#define NAN __builtin_nan("")
#define INFINITY __builtin_inff()
#define NAN __builtin_nanf("")
#else
#define HUGE_VALF (float)HUGE_VAL
#define HUGE_VALL (long double)HUGE_VAL
......@@ -78,14 +68,11 @@ extern const union __nan_un {
#define MATH_ERREXCEPT 2
#define math_errhandling MATH_ERREXCEPT
/* XXX We need a <machine/math.h>. */
#if defined(__ia64__) || defined(__sparc64__)
#define FP_FAST_FMA
#endif
#define FP_FAST_FMAF 1
#ifdef __ia64__
#define FP_FAST_FMAL
#define FP_FAST_FMA 1
#define FP_FAST_FMAL 1
#endif
#define FP_FAST_FMAF
/* Symbolic constants to classify floating point numbers. */
#define FP_INFINITE 0x01
......@@ -104,10 +91,10 @@ extern const union __nan_un {
: __isfinitel(x))
#define isinf(x) \
((sizeof (x) == sizeof (float)) ? __isinff(x) \
: (sizeof (x) == sizeof (double)) ? __isinf(x) \
: (sizeof (x) == sizeof (double)) ? isinf(x) \
: __isinfl(x))
#define isnan(x) \
((sizeof (x) == sizeof (float)) ? isnanf(x) \
((sizeof (x) == sizeof (float)) ? __isnanf(x) \
: (sizeof (x) == sizeof (double)) ? isnan(x) \
: __isnanl(x))
#define isnormal(x) \
......@@ -137,16 +124,14 @@ extern const union __nan_un {
: (sizeof (x) == sizeof (double)) ? __signbit(x) \
: __signbitl(x))
#if 0
typedef __double_t double_t;
typedef __float_t float_t;
#endif
/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
#endif /* __ISO_C_VISIBLE >= 1999 */
/*
* XOPEN/SVID
*/
/* #if __BSD_VISIBLE || __XSI_VISIBLE */
#if __BSD_VISIBLE || __XSI_VISIBLE
#define M_E 2.7182818284590452354 /* e */
#define M_LOG2E 1.4426950408889634074 /* log 2e */
#define M_LOG10E 0.43429448190325182765 /* log 10e */
......@@ -163,7 +148,7 @@ typedef __float_t float_t;
#define MAXFLOAT ((float)3.40282346638528860e+38)
extern int signgam;
/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
#if __BSD_VISIBLE
#if 0
......@@ -190,8 +175,8 @@ int __isfinitef(float) __pure2;
int __isfinite(double) __pure2;
int __isfinitel(long double) __pure2;
int __isinff(float) __pure2;
int __isinf(double) __pure2;
int __isinfl(long double) __pure2;
int __isnanf(float) __pure2;
int __isnanl(long double) __pure2;
int __isnormalf(float) __pure2;
int __isnormal(double) __pure2;
......@@ -230,7 +215,7 @@ double fmod(double, double);
/*
* These functions are not in C90.
*/
/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE
double acosh(double);
double asinh(double);
double atanh(double);
......@@ -242,12 +227,13 @@ double expm1(double);
double fma(double, double, double);
double hypot(double, double);
int ilogb(double) __pure2;
/* int (isinf)(double) __pure2; */
int (isinf)(double) __pure2;
int (isnan)(double) __pure2;
double lgamma(double);
long long llrint(double);
long long llround(double);
double log1p(double);
double log2(double);
double logb(double);
long lrint(double);
long lround(double);
......@@ -256,23 +242,26 @@ double nextafter(double, double);
double remainder(double, double);
double remquo(double, double, int *);
double rint(double);
/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
/* #if __BSD_VISIBLE || __XSI_VISIBLE */
#if __BSD_VISIBLE || __XSI_VISIBLE
double j0(double);
double j1(double);
double jn(int, double);
double scalb(double, double);
double y0(double);
double y1(double);
double yn(int, double);
/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
double gamma(double);
/* #endif */
/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
#endif
#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE
double scalb(double, double);
#endif
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
double copysign(double, double) __pure2;
double fdim(double, double);
double fmax(double, double) __pure2;
......@@ -283,12 +272,12 @@ double scalbln(double, long);
double scalbn(double, int);
double tgamma(double);
double trunc(double);
/* #endif */
#endif
/*
* BSD math library entry points
*/
/* #if __BSD_VISIBLE */
#if __BSD_VISIBLE
double drem(double, double);
int finite(double) __pure2;
int isnanf(float) __pure2;
......@@ -304,10 +293,10 @@ double lgamma_r(double, int *);
* IEEE Test Vector
*/
double significand(double);
/* #endif */ /* __BSD_VISIBLE */
#endif /* __BSD_VISIBLE */
/* float versions of ANSI/POSIX functions */
/*#if __ISO_C_VISIBLE >= 1999 */
#if __ISO_C_VISIBLE >= 1999
float acosf(float);
float asinf(float);
float atanf(float);
......@@ -328,6 +317,7 @@ int ilogbf(float) __pure2;
float ldexpf(float, int);
float log10f(float);
float log1pf(float);
float log2f(float);
float logf(float);
float modff(float, float *); /* fundamentally !__pure2 */
......@@ -370,12 +360,12 @@ float fdimf(float, float);
float fmaf(float, float, float);
float fmaxf(float, float) __pure2;
float fminf(float, float) __pure2;
/* #endif */
#endif
/*
* float versions of BSD math library entry points
*/
/* #if __BSD_VISIBLE */
#if __BSD_VISIBLE
float dremf(float, float);
int finitef(float) __pure2;
float gammaf(float);
......@@ -399,98 +389,92 @@ float lgammaf_r(float, int *);
* float version of IEEE Test Vector
*/
float significandf(float);
/* #endif */ /* __BSD_VISIBLE */
#endif /* __BSD_VISIBLE */
/*
* long double versions of ISO/POSIX math functions
*/
/* #if __ISO_C_VISIBLE >= 1999 */
#if 0
long double acoshl(long double);
#if __ISO_C_VISIBLE >= 1999
long double acosl(long double);
long double asinhl(long double);
long double asinl(long double);
long double atan2l(long double, long double);
long double atanhl(long double);
long double atanl(long double);
long double cbrtl(long double);
#endif
long double ceill(long double);
long double copysignl(long double, long double) __pure2;
#if 0
long double coshl(long double);
long double cosl(long double);
long double erfcl(long double);
long double erfl(long double);
long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
#endif
long double fabsl(long double) __pure2;
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double);
long double fmaxl(long double, long double) __pure2;
long double fminl(long double, long double) __pure2;
#if 0
long double fmodl(long double, long double);
#endif
long double frexpl(long double value, int *); /* fundamentally !__pure2 */
#if 0
long double hypotl(long double, long double);
#endif
int ilogbl(long double) __pure2;
long double ldexpl(long double, int);
#if 0
long double lgammal(long double);
long long llrintl(long double);
#endif
long long llroundl(long double);
#if 0
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
long double logbl(long double);
long double logl(long double);
long lrintl(long double);
#endif
long lroundl(long double);
#if 0
long double modfl(long double, long double *); /* fundamentally !__pure2 */
long double nanl(const char *) __pure2;
long double nearbyintl(long double);
#endif
long double nextafterl(long double, long double);
double nexttoward(double, long double);
float nexttowardf(float, long double);
long double nexttowardl(long double, long double);
#if 0
long double powl(long double, long double);
long double remainderl(long double, long double);
long double remquol(long double, long double, int *);
long double rintl(long double);
#endif
long double roundl(long double);
long double scalblnl(long double, long);
long double scalbnl(long double, int);
#if 0
long double sinhl(long double);
long double sinl(long double);
long double sqrtl(long double);
long double tanhl(long double);
long double tanl(long double);
long double tgammal(long double);
#endif
long double truncl(long double);
/* BIONIC: GLibc compatibility - required by the ARM toolchain */
#ifdef _GNU_SOURCE
void sincos(double x, double *sin, double *cos);
void sincosf(float x, float *sin, float *cos);
void sincosl(long double x, long double *sin, long double *cos);
#endif
/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
#endif /* __ISO_C_VISIBLE >= 1999 */
__END_DECLS
#endif /* !_MATH_H_ */
/* separate header for cmath */
#ifndef _MATH_EXTRA_H_
#if __ISO_C_VISIBLE >= 1999
#if _DECLARE_C99_LDBL_MATH
#define _MATH_EXTRA_H_
/*
* extra long double versions of math functions for C99 and cmath
*/
__BEGIN_DECLS
long double acoshl(long double);
long double asinhl(long double);
long double atanhl(long double);
long double coshl(long double);
long double erfcl(long double);
long double erfl(long double);
long double expm1l(long double);
long double lgammal(long double);
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
long double logl(long double);
long double powl(long double, long double);
long double sinhl(long double);
long double tanhl(long double);
long double tgammal(long double);
__END_DECLS
#endif /* !_DECLARE_C99_LDBL_MATH */
#endif /* __ISO_C_VISIBLE >= 1999 */
#endif /* !_MATH_EXTRA_H_ */
......@@ -28,7 +28,7 @@
#include <math.h>
#include <sys/cdefs.h>
#include "src/fpmath.h"
#include "fpmath.h"
/*
* XXX These routines belong in libm, but they must remain in libc for
......@@ -66,4 +66,3 @@ __isinfl(long double e)
return (u.bits.exp == 2047 && u.bits.manl == 0 && u.bits.manh == 0);
#endif
}
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD: src/lib/msun/man/acos.3,v 1.13 2005/01/14 23:28:28 das Exp $
.\"
.Dd January 14, 2005
.Dt ACOS 3
.Os
.Sh NAME
.Nm acos ,
.Nm acosf
.Nd arc cosine functions
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn acos "double x"
.Ft float
.Fn acosf "float x"
.Sh DESCRIPTION
The
.Fn acos
and the
.Fn acosf
functions compute the principal value of the arc cosine of
.Fa x .
A domain error occurs for arguments not in the range
.Bq -1 , +1 .
For a discussion of error due to roundoff, see
.Xr math 3 .
.Sh RETURN VALUES
The
.Fn acos
and the
.Fn acosf
functions return the arc cosine in the range
.Bq 0 , \*(Pi
radians.
If:
.Bd -unfilled -offset indent
.Pf \&| Ns Ar x Ns \&| > 1 ,
.Ed
.Pp
.Fn acos x
raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr asin 3 ,
.Xr atan 3 ,
.Xr atan2 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
.Xr fenv 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3
.Sh STANDARDS
The
.Fn acos
function conforms to
.St -isoC .
.\" Copyright (c) 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91
.\" $FreeBSD: src/lib/msun/man/acosh.3,v 1.11 2005/01/14 23:28:28 das Exp $
.\"
.Dd January 14, 2005
.Dt ACOSH 3
.Os
.Sh NAME
.Nm acosh ,
.Nm acoshf
.Nd inverse hyperbolic cosine functions
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn acosh "double x"
.Ft float
.Fn acoshf "float x"
.Sh DESCRIPTION
The
.Fn acosh
and the
.Fn acoshf
functions compute the inverse hyperbolic cosine
of the real
argument
.Ar x .
For a discussion of error due to roundoff, see
.Xr math 3 .
.Sh RETURN VALUES
The
.Fn acosh
and the
.Fn acoshf
functions
return the inverse hyperbolic cosine of
.Ar x .
If the argument is less than 1,
.Fn acosh
raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr asinh 3 ,
.Xr atanh 3 ,
.Xr exp 3 ,
.Xr fenv 3 ,
.Xr math 3
.Sh HISTORY
The
.Fn acosh
function appeared in
.Bx 4.3 .
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)asin.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD: src/lib/msun/man/asin.3,v 1.15 2005/01/14 23:28:28 das Exp $
.\"
.Dd January 14, 2005
.Dt ASIN 3
.Os
.Sh NAME
.Nm asin ,
.Nm asinf
.Nd arc sine functions
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn asin "double x"
.Ft float
.Fn asinf "float x"
.Sh DESCRIPTION
The
.Fn asin
and the
.Fn asinf
functions compute the principal value of the arc sine of
.Fa x .
A domain error occurs for arguments not in the range
.Bq -1 , +1 .
For a discussion of error due to roundoff, see
.Xr math 3 .
.Sh RETURN VALUES
The
.Fn asin
and the
.Fn asinf
functions return the arc sine in the range
.Bk -words
.Bq -\*(Pi/2 , +\*(Pi/2
.Ek
radians.
If:
.Bd -unfilled -offset indent
.Pf \&| Ns Ar x Ns \&| > 1
.Ed
.Pp
.Fn asin x
raises an invalid exception and returns an \*(Na.
.Sh SEE ALSO
.Xr acos 3 ,
.Xr atan 3 ,
.Xr atan2 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
.Xr fenv 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3
.Sh STANDARDS
The
.Fn asin
function conforms to
.St -isoC .
.\" Copyright (c) 1985, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)asinh.3 6.4 (Berkeley) 5/6/91
.\" $FreeBSD: src/lib/msun/man/asinh.3,v 1.10 2001/10/13 12:23:22 bde Exp $
.\"
.Dd May 6, 1991
.Dt ASINH 3
.Os
.Sh NAME
.Nm asinh ,
.Nm asinhf
.Nd inverse hyperbolic sine functions
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn asinh "double x"
.Ft float
.Fn asinhf "float x"
.Sh DESCRIPTION
The
.Fn asinh
and the
.Fn asinhf
functions compute the inverse hyperbolic sine
of the real
argument
.Ar x .
For a discussion of error due to roundoff, see
.Xr math 3 .
.Sh RETURN VALUES
The
.Fn asinh
and the
.Fn asinhf
functions
return the inverse hyperbolic sine of
.Ar x .
.Sh SEE ALSO
.Xr acosh 3 ,
.Xr atanh 3 ,
.Xr exp 3 ,
.Xr math 3
.Sh HISTORY
The
.Fn asinh
function appeared in
.Bx 4.3 .
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)atan.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD: src/lib/msun/man/atan.3,v 1.10 2001/10/13 12:23:22 bde Exp $
.\"
.Dd May 2, 1991
.Dt ATAN 3
.Os
.Sh NAME
.Nm atan ,
.Nm atanf
.Nd arc tangent functions of one variable
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn atan "double x"
.Ft float
.Fn atanf "float x"
.Sh DESCRIPTION
The
.Fn atan
and the
.Fn atanf
functions compute the principal value of the arc tangent of
.Fa x .
For a discussion of error due to roundoff, see
.Xr math 3 .
.Sh RETURN VALUES
The
.Fn atan
and the
.Fn atanf
function returns the arc tangent in the range
.Bk -words
.Bq -\*(Pi/2 , +\*(Pi/2
.Ek
radians.
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
.Xr atan2 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3
.Sh STANDARDS
The
.Fn atan
function conforms to
.St -isoC .
.\" Copyright (c) 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 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
.\" SUCH DAMAGE.
.\"
.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91
.\" $FreeBSD: src/lib/msun/man/atan2.3,v 1.14 2005/01/28 21:13:34 ru Exp $
.\"
.Dd January 14, 2005
.Dt ATAN2 3
.Os
.Sh NAME
.Nm atan2 ,
.Nm atan2f
.Nd arc tangent functions of two variables
.Sh LIBRARY
.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn atan2 "double y" "double x"
.Ft float
.Fn atan2f "float y" "float x"
.Sh DESCRIPTION
The
.Fn atan2
and the
.Fn atan2f
functions compute the principal value of the arc tangent of
.Fa y/ Ns Ar x ,
using the signs of both arguments to determine the quadrant of
the return value.
.Sh RETURN VALUES
The
.Fn atan2
and the
.Fn atan2f
functions, if successful,
return the arc tangent of
.Fa y/ Ns Ar x
in the range
.Bk -words
.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
.Ek
radians.
Here are some of the special cases:
.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___
.It Fn atan2 y x No := Ta
.Fn atan y/x Ta
if
.Ar x
> 0,
.It Ta sign( Ns Ar y Ns )*(\*(Pi -
.Fn atan "\\*(Bay/x\\*(Ba" ) Ta
if
.Ar x
< 0,
.It Ta
.No 0 Ta
if x = y = 0, or
.It Ta
.Pf sign( Ar y Ns )*\\*(Pi/2 Ta
if
.Ar x
= 0 \(!=
.Ar y .
.El
.Sh NOTES
The function
.Fn atan2
defines "if x > 0,"
.Fn atan2 0 0
= 0 despite that previously
.Fn atan2 0 0
may have generated an error message.
The reasons for assigning a value to
.Fn atan2 0 0
are these:
.Bl -enum -offset indent
.It
Programs that test arguments to avoid computing
.Fn atan2 0 0
must be indifferent to its value.
Programs that require it to be invalid are vulnerable
to diverse reactions to that invalidity on diverse computer systems.
.It
The
.Fn atan2
function is used mostly to convert from rectangular (x,y)
to polar
.if n\
(r,theta)
.if t\
(r,\(*h)
coordinates that must satisfy x =
.if n\
r\(**cos theta
.if t\
r\(**cos\(*h
and y =
.if n\
r\(**sin theta.
.if t\
r\(**sin\(*h.
These equations are satisfied when (x=0,y=0)
is mapped to
.if n \
(r=0,theta=0).
.if t \
(r=0,\(*h=0).
In general, conversions to polar coordinates
should be computed thus:
.Bd -unfilled -offset indent
.if n \{\
r := hypot(x,y); ... := sqrt(x\(**x+y\(**y)
theta := atan2(y,x).
.\}
.if t \{\
r := hypot(x,y); ... := \(sr(x\u\s82\s10\d+y\u\s82\s10\d)
\(*h := atan2(y,x).
.\}
.Ed
.It
The foregoing formulas need not be altered to cope in a
reasonable way with signed zeros and infinities
on a machine that conforms to
.Tn IEEE 754 ;
the versions of
.Xr hypot 3
and
.Fn atan2
provided for
such a machine are designed to handle all cases.
That is why
.Fn atan2 \(+-0 \-0
= \(+-\*(Pi
for instance.
In general the formulas above are equivalent to these:
.Bd -unfilled -offset indent
.if n \
r := sqrt(x\(**x+y\(**y); if r = 0 then x := copysign(1,x);
.if t \
r := \(sr(x\(**x+y\(**y);\0\0if r = 0 then x := copysign(1,x);
.Ed
.El
.Sh SEE ALSO
.Xr acos 3 ,
.Xr asin 3 ,
.Xr atan 3 ,
.Xr cos 3 ,
.Xr cosh 3 ,
.Xr math 3 ,
.Xr sin 3 ,
.Xr sinh 3 ,
.Xr tan 3 ,
.Xr tanh 3
.Sh STANDARDS
The
.Fn atan2
function conforms to
.St -isoC .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment