Changeset 96298 in vbox
- Timestamp:
- Aug 18, 2022 2:28:28 PM (2 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r96282 r96298 1826 1826 common/math/fminf.cpp \ 1827 1827 common/math/fminl.cpp \ 1828 common/math/frexp.cpp \ 1829 common/math/frexpf.cpp \ 1830 common/math/frexpl.cpp \ 1828 1831 common/math/__fpclassifyd.cpp \ 1829 1832 common/math/__fpclassifyf.cpp \ -
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r96282 r96298 614 614 ../common/math/round.cpp \ 615 615 ../common/math/roundf.cpp \ 616 ../common/math/frexp.cpp \ 617 ../common/math/frexpf.cpp \ 618 ../common/math/frexpl.cpp \ 616 619 ../common/math/__fpclassifyd.cpp \ 617 620 ../common/math/__fpclassifyf.cpp \ -
trunk/src/VBox/Runtime/testcase/tstRTNoCrt-2.cpp
r96282 r96298 1026 1026 CHECK_INT(RT_NOCRT(__signbitl)(RTStrNanLongDouble(NULL, true)), 0); 1027 1027 CHECK_INT(RT_NOCRT(__signbitl)(RTStrNanLongDouble("4sig", false)), 1); 1028 } 1029 1030 1031 void testFrExp() 1032 { 1033 RTTestSub(g_hTest, "frexp[fl]"); 1034 int iExp; 1035 1036 CHECK_DBL(RT_NOCRT(frexp)( +1.0, &iExp), +0.50000000000000000000); CHECK_INT(iExp, 1); 1037 CHECK_DBL(RT_NOCRT(frexp)( -1.0, &iExp), -0.50000000000000000000); CHECK_INT(iExp, 1); 1038 CHECK_DBL(RT_NOCRT(frexp)( +42.22, &iExp), +0.65968749999999998224); CHECK_INT(iExp, 6); 1039 CHECK_DBL(RT_NOCRT(frexp)( -42.22, &iExp), -0.65968749999999998224); CHECK_INT(iExp, 6); 1040 CHECK_DBL(RT_NOCRT(frexp)( +88888.88888, &iExp), +0.67816840270996092688); CHECK_INT(iExp, 17); 1041 CHECK_DBL(RT_NOCRT(frexp)( -999999.9999, &iExp), -0.95367431631088261934); CHECK_INT(iExp, 20); 1042 CHECK_DBL(RT_NOCRT(frexp)( +1.3942340e+200, &iExp), +0.91072771427195720051); CHECK_INT(iExp, 665); 1043 CHECK_DBL(RT_NOCRT(frexp)( -1.3942340e+200, &iExp), -0.91072771427195720051); CHECK_INT(iExp, 665); 1044 CHECK_DBL(RT_NOCRT(frexp)( -1.1984e-310, &iExp), -0.68939374490207683266); CHECK_INT(iExp, -1029); /* subnormal */ 1045 CHECK_DBL(RT_NOCRT(frexp)( -INFINITY, &iExp), -INFINITY); CHECK_INT(iExp, INT_MIN); 1046 CHECK_DBL(RT_NOCRT(frexp)( +INFINITY, &iExp), +INFINITY); CHECK_INT(iExp, INT_MAX); 1047 CHECK_DBL(RT_NOCRT(frexp)( RTStrNanDouble(NULL, true), &iExp), RTStrNanDouble(NULL, true)); CHECK_INT(iExp, INT_MAX); 1048 CHECK_DBL(RT_NOCRT(frexp)( RTStrNanDouble("4sig", false), &iExp), RTStrNanDouble("4sig", false)); CHECK_INT(iExp, INT_MIN); 1049 1050 CHECK_FLT(RT_NOCRT(frexpf)( +1.0f, &iExp), +0.500000000000000f); CHECK_INT(iExp, 1); 1051 CHECK_FLT(RT_NOCRT(frexpf)( -1.0f, &iExp), -0.500000000000000f); CHECK_INT(iExp, 1); 1052 CHECK_FLT(RT_NOCRT(frexpf)( +42.22f, &iExp), +0.659687519073486f); CHECK_INT(iExp, 6); 1053 CHECK_FLT(RT_NOCRT(frexpf)( -42.22f, &iExp), -0.659687519073486f); CHECK_INT(iExp, 6); 1054 CHECK_FLT(RT_NOCRT(frexpf)( +88888.88888f, &iExp), +0.678168416023254f); CHECK_INT(iExp, 17); 1055 CHECK_FLT(RT_NOCRT(frexpf)( -999999.9999f, &iExp), -0.953674316406250f); CHECK_INT(iExp, 20); 1056 CHECK_FLT(RT_NOCRT(frexpf)( +1.3942340e+32f, &iExp), +0.859263062477112f); CHECK_INT(iExp, 107); 1057 CHECK_FLT(RT_NOCRT(frexpf)( -1.3942340e+35f, &iExp), -0.839124083518982f); CHECK_INT(iExp, 117); 1058 CHECK_FLT(RT_NOCRT(frexpf)( -2.1984e-40f, &iExp), -0.598461151123047f); CHECK_INT(iExp, -131); 1059 CHECK_FLT(RT_NOCRT(frexpf)( -(float)INFINITY, &iExp), -(float)INFINITY); CHECK_INT(iExp, INT_MIN); 1060 CHECK_FLT(RT_NOCRT(frexpf)( +(float)INFINITY, &iExp), +(float)INFINITY); CHECK_INT(iExp, INT_MAX); 1061 CHECK_FLT(RT_NOCRT(frexpf)( RTStrNanFloat(NULL, true), &iExp), RTStrNanFloat(NULL, true)); CHECK_INT(iExp, INT_MAX); 1062 CHECK_FLT(RT_NOCRT(frexpf)( RTStrNanFloat("4sig", false), &iExp), RTStrNanFloat("4sig", false)); CHECK_INT(iExp, INT_MIN); 1063 1064 #ifdef RT_COMPILER_WITH_64BIT_LONG_DOUBLE 1065 CHECK_LDBL(RT_NOCRT(frexpl)( +1.0L, &iExp), +0.50000000000000000000L); CHECK_INT(iExp, 1); 1066 CHECK_LDBL(RT_NOCRT(frexpl)( -1.0L, &iExp), -0.50000000000000000000L); CHECK_INT(iExp, 1); 1067 CHECK_LDBL(RT_NOCRT(frexpl)( +42.22L, &iExp), +0.65968749999999998224L); CHECK_INT(iExp, 6); 1068 CHECK_LDBL(RT_NOCRT(frexpl)( -42.22L, &iExp), -0.65968749999999998224L); CHECK_INT(iExp, 6); 1069 CHECK_LDBL(RT_NOCRT(frexpl)( +88888.88888L, &iExp), +0.67816840270996092688L); CHECK_INT(iExp, 17); 1070 CHECK_LDBL(RT_NOCRT(frexpl)( -999999.9999L, &iExp), -0.95367431631088261934L); CHECK_INT(iExp, 20); 1071 CHECK_LDBL(RT_NOCRT(frexpl)( +1.3942340e+200L, &iExp), +0.91072771427195720051L); CHECK_INT(iExp, 665); 1072 CHECK_LDBL(RT_NOCRT(frexpl)( -1.3942340e+200L, &iExp), -0.91072771427195720051L); CHECK_INT(iExp, 665); 1073 CHECK_LDBL(RT_NOCRT(frexpl)( -1.1984e-310L, &iExp), -0.68939374490207683266L); CHECK_INT(iExp, -1029); /* subnormal */ 1074 #else 1075 CHECK_LDBL(RT_NOCRT(frexpl)( +1.0L, &iExp), +0.500000000000000000000000000000000L); CHECK_INT(iExp, 1); 1076 CHECK_LDBL(RT_NOCRT(frexpl)( -1.0L, &iExp), -0.500000000000000000000000000000000L); CHECK_INT(iExp, 1); 1077 CHECK_LDBL(RT_NOCRT(frexpl)( +42.22L, &iExp), +0.659687500000000000017347234759768L); CHECK_INT(iExp, 6); 1078 CHECK_LDBL(RT_NOCRT(frexpl)( -42.22L, &iExp), -0.659687500000000000017347234759768L); CHECK_INT(iExp, 6); 1079 CHECK_LDBL(RT_NOCRT(frexpl)( +8888888.88888888L, &iExp), +0.529819064670138359081450613041753L); CHECK_INT(iExp, 24); 1080 CHECK_LDBL(RT_NOCRT(frexpl)( -999999999999.9999999L, &iExp), -0.909494701772928237806618845251450L); CHECK_INT(iExp, 40); 1081 CHECK_LDBL(RT_NOCRT(frexpl)( +1.3942340e+4001L, &iExp), +0.713893296064537648672014558126619L); CHECK_INT(iExp, 13292); 1082 CHECK_LDBL(RT_NOCRT(frexpl)( -1.3942340e+2000L, &iExp), -0.630978384969008136966966970859971L); CHECK_INT(iExp, 6645); 1083 CHECK_LDBL(RT_NOCRT(frexpl)( -2.1984e-4935L, &iExp), -0.669569464164694649888076583010843L); CHECK_INT(iExp, -16392); 1084 #endif 1085 CHECK_LDBL(RT_NOCRT(frexpl)( -(long double)INFINITY, &iExp), -(long double)INFINITY); CHECK_INT(iExp, INT_MIN); 1086 CHECK_LDBL(RT_NOCRT(frexpl)( +(long double)INFINITY, &iExp), +(long double)INFINITY); CHECK_INT(iExp, INT_MAX); 1087 CHECK_LDBL(RT_NOCRT(frexpl)(RTStrNanLongDouble(NULL, true), &iExp), RTStrNanLongDouble(NULL, true)); CHECK_INT(iExp, INT_MAX); 1088 CHECK_LDBL(RT_NOCRT(frexpl)(RTStrNanLongDouble("4sig", false), &iExp), RTStrNanLongDouble("4sig", false)); CHECK_INT(iExp, INT_MIN); 1028 1089 } 1029 1090 … … 3537 3598 testFpClassify(); 3538 3599 testSignBit(); 3600 testFrExp(); 3539 3601 testCeil(); 3540 3602 testFloor();
Note:
See TracChangeset
for help on using the changeset viewer.