Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit cc1135d

Browse files
committed
Updating the PAL layer to support acosh, asinh, atanh, and cbrt
1 parent ecf4dc8 commit cc1135d

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

src/pal/inc/pal.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4946,14 +4946,18 @@ CoCreateGuid(OUT GUID * pguid);
49464946
#define atol PAL_atol
49474947
#define labs PAL_labs
49484948
#define acos PAL_acos
4949+
#define acosh PAL_acosh
49494950
#define asin PAL_asin
4951+
#define asinh PAL_asinh
49504952
#define atan2 PAL_atan2
49514953
#define exp PAL_exp
49524954
#define log PAL_log
49534955
#define log10 PAL_log10
49544956
#define pow PAL_pow
49554957
#define acosf PAL_acosf
4958+
#define acoshf PAL_acoshf
49564959
#define asinf PAL_asinf
4960+
#define asinhf PAL_asinhf
49574961
#define atan2f PAL_atan2f
49584962
#define expf PAL_expf
49594963
#define logf PAL_logf
@@ -5198,9 +5202,13 @@ PALIMPORT int __cdecl _finite(double);
51985202
PALIMPORT int __cdecl _isnan(double);
51995203
PALIMPORT double __cdecl _copysign(double, double);
52005204
PALIMPORT double __cdecl acos(double);
5205+
PALIMPORT double __cdecl acosh(double);
52015206
PALIMPORT double __cdecl asin(double);
5207+
PALIMPORT double __cdecl asinh(double);
52025208
PALIMPORT double __cdecl atan(double);
5209+
PALIMPORT double __cdecl atanh(double);
52035210
PALIMPORT double __cdecl atan2(double, double);
5211+
PALIMPORT double __cdecl cbrt(double);
52045212
PALIMPORT double __cdecl ceil(double);
52055213
PALIMPORT double __cdecl cos(double);
52065214
PALIMPORT double __cdecl cosh(double);
@@ -5222,9 +5230,13 @@ PALIMPORT int __cdecl _finitef(float);
52225230
PALIMPORT int __cdecl _isnanf(float);
52235231
PALIMPORT float __cdecl _copysignf(float, float);
52245232
PALIMPORT float __cdecl acosf(float);
5233+
PALIMPORT float __cdecl acoshf(float);
52255234
PALIMPORT float __cdecl asinf(float);
5235+
PALIMPORT float __cdecl asinhf(float);
52265236
PALIMPORT float __cdecl atanf(float);
5237+
PALIMPORT float __cdecl atanhf(float);
52275238
PALIMPORT float __cdecl atan2f(float, float);
5239+
PALIMPORT float __cdecl cbrtf(float);
52285240
PALIMPORT float __cdecl ceilf(float);
52295241
PALIMPORT float __cdecl cosf(float);
52305242
PALIMPORT float __cdecl coshf(float);

src/pal/src/cruntime/math.cpp

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,25 @@ PALIMPORT double __cdecl PAL_acos(double x)
141141
return ret;
142142
}
143143

144+
/*++
145+
Function:
146+
acosh
147+
148+
See MSDN.
149+
--*/
150+
PALIMPORT double __cdecl PAL_acosh(double x)
151+
{
152+
double ret;
153+
PERF_ENTRY(acosh);
154+
ENTRY("acosh (x=%f)\n", x);
155+
156+
ret = acosh(x);
157+
158+
LOGEXIT("acosh returns double %f\n", ret);
159+
PERF_EXIT(acosh);
160+
return ret;
161+
}
162+
144163
/*++
145164
Function:
146165
asin
@@ -171,6 +190,25 @@ PALIMPORT double __cdecl PAL_asin(double x)
171190
return ret;
172191
}
173192

193+
/*++
194+
Function:
195+
asinh
196+
197+
See MSDN.
198+
--*/
199+
PALIMPORT double __cdecl PAL_asinh(double x)
200+
{
201+
double ret;
202+
PERF_ENTRY(asinh);
203+
ENTRY("asinh (x=%f)\n", x);
204+
205+
ret = asinh(x);
206+
207+
LOGEXIT("asinh returns double %f\n", ret);
208+
PERF_EXIT(asinh);
209+
return ret;
210+
}
211+
174212
/*++
175213
Function:
176214
atan2
@@ -513,6 +551,25 @@ PALIMPORT float __cdecl PAL_acosf(float x)
513551
return ret;
514552
}
515553

554+
/*++
555+
Function:
556+
acoshf
557+
558+
See MSDN.
559+
--*/
560+
PALIMPORT float __cdecl PAL_acoshf(float x)
561+
{
562+
float ret;
563+
PERF_ENTRY(acoshf);
564+
ENTRY("acoshf (x=%f)\n", x);
565+
566+
ret = acoshf(x);
567+
568+
LOGEXIT("acoshf returns float %f\n", ret);
569+
PERF_EXIT(acoshf);
570+
return ret;
571+
}
572+
516573
/*++
517574
Function:
518575
asinf
@@ -543,6 +600,26 @@ PALIMPORT float __cdecl PAL_asinf(float x)
543600
return ret;
544601
}
545602

603+
/*++
604+
Function:
605+
asinhf
606+
607+
See MSDN.
608+
--*/
609+
PALIMPORT float __cdecl PAL_asinhf(float x)
610+
{
611+
float ret;
612+
PERF_ENTRY(asinhf);
613+
ENTRY("asinhf (x=%f)\n", x);
614+
615+
ret = asinhf(x);
616+
617+
LOGEXIT("asinhf returns float %f\n", ret);
618+
PERF_EXIT(asinhf);
619+
return ret;
620+
}
621+
622+
546623
/*++
547624
Function:
548625
atan2f

src/pal/src/include/pal/palinternal.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,13 @@ function_name() to call the system's implementation
447447
#undef labs
448448
#undef llabs
449449
#undef acos
450+
#undef acosh
450451
#undef asin
452+
#undef asinh
451453
#undef atan
454+
#undef atanh
452455
#undef atan2
456+
#undef cbrt
453457
#undef ceil
454458
#undef cos
455459
#undef cosh
@@ -467,9 +471,13 @@ function_name() to call the system's implementation
467471
#undef tan
468472
#undef tanh
469473
#undef acosf
474+
#undef acoshf
470475
#undef asinf
476+
#undef asinhf
471477
#undef atanf
478+
#undef atanhf
472479
#undef atan2f
480+
#undef cbrtf
473481
#undef ceilf
474482
#undef cosf
475483
#undef coshf

0 commit comments

Comments
 (0)