mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-14 02:02:39 +08:00
New (Split out from math/).
This commit is contained in:
1 parent
6fc0d9a479
commit
2e50ba1a2b
10 files changed
+1083
No files matched your search
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -0,0 +1,30 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
rtems_tests_PROGRAMS = mathf
|
||||
mathf_SOURCES = init.c domathf.c
|
||||
EXTRA_DIST = $(srcdir)/../math/domath.in
|
||||
|
||||
$(srcdir)/domathf.c: $(srcdir)/../math/domath.in
|
||||
sed -e 's,[@]FTYPE[@],float,' \
|
||||
-e 's,[@]FSUFFIX[@],f,g' \
|
||||
-e 's,[@]FGUARD[@],NO_FLOAT,' \
|
||||
$(srcdir)/../math/domath.in > $(srcdir)/domathf.c
|
||||
|
||||
dist_rtems_tests_DATA = mathf.scn
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
mathf_LDADD = -lm
|
||||
|
||||
LINK_OBJS = $(mathf_OBJECTS) $(mathf_LDADD)
|
||||
LINK_LIBS = $(mathf_LDLIBS)
|
||||
|
||||
mathf$(EXEEXT): $(mathf_OBJECTS) $(mathf_DEPENDENCIES)
|
||||
@rm -f mathf$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,62 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if __rtems__
|
||||
#include <bsp.h> /* for device driver prototypes */
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern void domathf(void);
|
||||
|
||||
#if __rtems__
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
#else
|
||||
int main( void )
|
||||
#endif
|
||||
{
|
||||
fprintf( stdout, "*** FLOAT MATH TEST ***\n" );
|
||||
|
||||
domathf();
|
||||
|
||||
fprintf( stdout, "*** END OF FLOAT MATH TEST ***\n" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
#if __rtems__
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
|
||||
|
||||
#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include <rtems/confdefs.h>
|
||||
#endif
|
||||
@@ -0,0 +1,164 @@
|
||||
*** FLOAT MATH TEST ***
|
||||
acos : 1.570796
|
||||
acosh : -nan
|
||||
asin : 1.570796
|
||||
asinh : 0.881374
|
||||
atan : 0.665774
|
||||
atan2 : 0.785398
|
||||
atanh : inf
|
||||
cbrt : 3.000000
|
||||
ceil : 4.000000
|
||||
copysign : -3.500000
|
||||
cos : 0.000000
|
||||
cosh : 2.509178
|
||||
erf : 1.000000
|
||||
erfc : 0.000000
|
||||
exp : 1.521962
|
||||
exp2 : 1.337928
|
||||
expm1 : 0.000420
|
||||
fabs : 1.123000
|
||||
fdim : 0.000000
|
||||
floor : 0.000000
|
||||
floor : -1.000000
|
||||
fma : 7.630000
|
||||
fmax : 0.420000
|
||||
fmin : -0.420000
|
||||
fmod : 0.000000
|
||||
fpclassify : 4
|
||||
frexp : 0.656250
|
||||
hypot : 59.396970
|
||||
ilogb : 5
|
||||
isfinite : 1
|
||||
isgreater : 0
|
||||
isgreaterequal : 0
|
||||
isinf : 0
|
||||
isless : 1
|
||||
islessequal : 1
|
||||
islessgreater : 1
|
||||
isnan : 0
|
||||
isnormal : 1
|
||||
isunordered : 1
|
||||
j0 : 0.671133
|
||||
j1 : 0.498289
|
||||
jn : 0.159349
|
||||
ldexp : 9.600000
|
||||
lgamma : 114.034212
|
||||
llrint : 0.000000
|
||||
llrint : 0.000000
|
||||
lround : -1.000000
|
||||
lround : 1.000000
|
||||
log : 3.737670
|
||||
log10 : 1.623249
|
||||
log1p : 3.761200
|
||||
log2 : 5.392317
|
||||
logb : 5.000000
|
||||
lrint : 0.000000
|
||||
lrint : 0.000000
|
||||
lround : -1.000000
|
||||
lround : 1.000000
|
||||
lmodf : 0.000000
|
||||
nan : nan
|
||||
nearbyint : 2.000000
|
||||
nextafter : 1.500000
|
||||
pow : 9.060100
|
||||
remainder : -0.990000
|
||||
remquo : -1.000000
|
||||
rint : 0.000000
|
||||
rint : -0.000000
|
||||
round : 1.000000
|
||||
round : -1.000000
|
||||
scalbln : 9.600000
|
||||
scalbn : 9.600000
|
||||
signbit : 0
|
||||
sin : 0.707107
|
||||
sinh : 0.868671
|
||||
sqrt : 3.000000
|
||||
tan : 1.000000
|
||||
tanh : 0.655794
|
||||
tgamma : 1.046486
|
||||
trunc : 3.000000
|
||||
y0 : 0.228084
|
||||
y1 : -0.621136
|
||||
yn : -3.589900
|
||||
acosf : 1.570796
|
||||
acoshf : -nan
|
||||
asinf : 1.570796
|
||||
asinhf : 0.881374
|
||||
atanf : 0.665774
|
||||
atan2f : 0.785398
|
||||
atanhf : inf
|
||||
cbrtf : 3.000000
|
||||
ceilf : 4.000000
|
||||
copysignf : -3.500000
|
||||
cosf : -0.000000
|
||||
coshf : 2.509179
|
||||
erff : 1.000000
|
||||
erfcf : 0.000000
|
||||
expf : 1.521962
|
||||
exp2f : 1.337928
|
||||
expm1f : 0.000420
|
||||
fabsf : 1.123000
|
||||
fdimf : 0.000000
|
||||
floorf : 0.000000
|
||||
floorf : -1.000000
|
||||
fmaf : 7.630000
|
||||
fmaxf : 0.420000
|
||||
fminf : -0.420000
|
||||
fmodf : 0.000000
|
||||
fpclassify : 4
|
||||
frexpf : 0.656250
|
||||
hypotf : 59.396969
|
||||
ilogbf : 5
|
||||
isfinite : 1
|
||||
isgreater : 0
|
||||
isgreaterequal : 0
|
||||
isinf : 0
|
||||
isless : 1
|
||||
islessequal : 1
|
||||
islessgreater : 1
|
||||
isnan : 0
|
||||
isnormal : 1
|
||||
isunordered : 1
|
||||
j0f : 0.671133
|
||||
j1f : 0.498289
|
||||
jnf : 0.159349
|
||||
ldexpf : 9.600000
|
||||
lgammaf : 114.034218
|
||||
llrintf : 0.000000
|
||||
llrintf : 0.000000
|
||||
lroundf : -1.000000
|
||||
lroundf : 1.000000
|
||||
logf : 3.737670
|
||||
log10f : 1.623249
|
||||
log1pf : 3.761200
|
||||
log2f : 5.392317
|
||||
logbf : 5.000000
|
||||
lrintf : 0.000000
|
||||
lrintf : 0.000000
|
||||
lroundf : -1.000000
|
||||
lroundf : 1.000000
|
||||
lmodff : 0.000000
|
||||
nanf : nan
|
||||
nearbyintf : 2.000000
|
||||
nextafterf : 1.500000
|
||||
powf : 9.060100
|
||||
remainderf : -0.990000
|
||||
remquof : -1.000000
|
||||
rintf : 0.000000
|
||||
rintf : -0.000000
|
||||
roundf : 1.000000
|
||||
roundf : -1.000000
|
||||
scalblnf : 9.600000
|
||||
scalbnf : 9.600000
|
||||
signbit : 0
|
||||
sinf : 0.707107
|
||||
sinhf : 0.868671
|
||||
sqrtf : 3.000000
|
||||
tanf : 1.000000
|
||||
tanhf : 0.655794
|
||||
tgammaf : 1.046486
|
||||
truncf : 3.000000
|
||||
y0f : 0.228084
|
||||
y1f : -0.621136
|
||||
ynf : -3.589899
|
||||
*** END OF FLOAT MATH TEST ***
|
||||
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
@@ -0,0 +1,35 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
rtems_tests_PROGRAMS = mathl
|
||||
mathl_SOURCES = init.c domathl.c
|
||||
EXTRA_DIST = $(srcdir)/../math/domath.in
|
||||
|
||||
# FIXME: Skip long double, not yet supported in newlib
|
||||
# => This test currently is a nop
|
||||
mathl_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LONG_DOUBLE
|
||||
|
||||
$(srcdir)/domathl.c: $(srcdir)/../math/domath.in
|
||||
sed -e 's,[@]FTYPE[@],long double,' \
|
||||
-e 's,[@]FSUFFIX[@],l,g' \
|
||||
-e 's,%f,%Lf,g' \
|
||||
-e 's,[@]FGUARD[@],NO_LONG_DOUBLE,' \
|
||||
$(srcdir)/../math/domath.in > $(srcdir)/domathl.c
|
||||
|
||||
dist_rtems_tests_DATA = mathl.scn
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../automake/compile.am
|
||||
include $(top_srcdir)/../automake/leaf.am
|
||||
|
||||
mathl_LDADD = -lm
|
||||
|
||||
LINK_OBJS = $(mathl_OBJECTS) $(mathl_LDADD)
|
||||
LINK_LIBS = $(mathl_LDLIBS)
|
||||
|
||||
mathl$(EXEEXT): $(mathl_OBJECTS) $(mathl_DEPENDENCIES)
|
||||
@rm -f mathl$(EXEEXT)
|
||||
$(make-exe)
|
||||
|
||||
include $(top_srcdir)/../automake/local.am
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,62 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is called from init_exec and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#if __rtems__
|
||||
#include <bsp.h> /* for device driver prototypes */
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
extern void domathl(void);
|
||||
|
||||
#if __rtems__
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
#else
|
||||
int main( void )
|
||||
#endif
|
||||
{
|
||||
fprintf( stdout, "*** LONG DOUBLE MATH TEST ***\n" );
|
||||
|
||||
domathl();
|
||||
|
||||
fprintf( stdout, "*** END OF LONG DOUBLE MATH TEST ***\n" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
#if __rtems__
|
||||
/* NOTICE: the clock driver is explicitly disabled */
|
||||
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
|
||||
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
|
||||
|
||||
#define CONFIGURE_MAXIMUM_TASKS 1
|
||||
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
|
||||
|
||||
#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
|
||||
|
||||
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
|
||||
|
||||
#define CONFIGURE_INIT
|
||||
#include <rtems/confdefs.h>
|
||||
#endif
|
||||
@@ -0,0 +1,164 @@
|
||||
*** FLOAT MATH TEST ***
|
||||
acos : 1.570796
|
||||
acosh : -nan
|
||||
asin : 1.570796
|
||||
asinh : 0.881374
|
||||
atan : 0.665774
|
||||
atan2 : 0.785398
|
||||
atanh : inf
|
||||
cbrt : 3.000000
|
||||
ceil : 4.000000
|
||||
copysign : -3.500000
|
||||
cos : 0.000000
|
||||
cosh : 2.509178
|
||||
erf : 1.000000
|
||||
erfc : 0.000000
|
||||
exp : 1.521962
|
||||
exp2 : 1.337928
|
||||
expm1 : 0.000420
|
||||
fabs : 1.123000
|
||||
fdim : 0.000000
|
||||
floor : 0.000000
|
||||
floor : -1.000000
|
||||
fma : 7.630000
|
||||
fmax : 0.420000
|
||||
fmin : -0.420000
|
||||
fmod : 0.000000
|
||||
fpclassify : 4
|
||||
frexp : 0.656250
|
||||
hypot : 59.396970
|
||||
ilogb : 5
|
||||
isfinite : 1
|
||||
isgreater : 0
|
||||
isgreaterequal : 0
|
||||
isinf : 0
|
||||
isless : 1
|
||||
islessequal : 1
|
||||
islessgreater : 1
|
||||
isnan : 0
|
||||
isnormal : 1
|
||||
isunordered : 1
|
||||
j0 : 0.671133
|
||||
j1 : 0.498289
|
||||
jn : 0.159349
|
||||
ldexp : 9.600000
|
||||
lgamma : 114.034212
|
||||
llrint : 0.000000
|
||||
llrint : 0.000000
|
||||
lround : -1.000000
|
||||
lround : 1.000000
|
||||
log : 3.737670
|
||||
log10 : 1.623249
|
||||
log1p : 3.761200
|
||||
log2 : 5.392317
|
||||
logb : 5.000000
|
||||
lrint : 0.000000
|
||||
lrint : 0.000000
|
||||
lround : -1.000000
|
||||
lround : 1.000000
|
||||
lmodf : 0.000000
|
||||
nan : nan
|
||||
nearbyint : 2.000000
|
||||
nextafter : 1.500000
|
||||
pow : 9.060100
|
||||
remainder : -0.990000
|
||||
remquo : -1.000000
|
||||
rint : 0.000000
|
||||
rint : -0.000000
|
||||
round : 1.000000
|
||||
round : -1.000000
|
||||
scalbln : 9.600000
|
||||
scalbn : 9.600000
|
||||
signbit : 0
|
||||
sin : 0.707107
|
||||
sinh : 0.868671
|
||||
sqrt : 3.000000
|
||||
tan : 1.000000
|
||||
tanh : 0.655794
|
||||
tgamma : 1.046486
|
||||
trunc : 3.000000
|
||||
y0 : 0.228084
|
||||
y1 : -0.621136
|
||||
yn : -3.589900
|
||||
acosf : 1.570796
|
||||
acoshf : -nan
|
||||
asinf : 1.570796
|
||||
asinhf : 0.881374
|
||||
atanf : 0.665774
|
||||
atan2f : 0.785398
|
||||
atanhf : inf
|
||||
cbrtf : 3.000000
|
||||
ceilf : 4.000000
|
||||
copysignf : -3.500000
|
||||
cosf : -0.000000
|
||||
coshf : 2.509179
|
||||
erff : 1.000000
|
||||
erfcf : 0.000000
|
||||
expf : 1.521962
|
||||
exp2f : 1.337928
|
||||
expm1f : 0.000420
|
||||
fabsf : 1.123000
|
||||
fdimf : 0.000000
|
||||
floorf : 0.000000
|
||||
floorf : -1.000000
|
||||
fmaf : 7.630000
|
||||
fmaxf : 0.420000
|
||||
fminf : -0.420000
|
||||
fmodf : 0.000000
|
||||
fpclassify : 4
|
||||
frexpf : 0.656250
|
||||
hypotf : 59.396969
|
||||
ilogbf : 5
|
||||
isfinite : 1
|
||||
isgreater : 0
|
||||
isgreaterequal : 0
|
||||
isinf : 0
|
||||
isless : 1
|
||||
islessequal : 1
|
||||
islessgreater : 1
|
||||
isnan : 0
|
||||
isnormal : 1
|
||||
isunordered : 1
|
||||
j0f : 0.671133
|
||||
j1f : 0.498289
|
||||
jnf : 0.159349
|
||||
ldexpf : 9.600000
|
||||
lgammaf : 114.034218
|
||||
llrintf : 0.000000
|
||||
llrintf : 0.000000
|
||||
lroundf : -1.000000
|
||||
lroundf : 1.000000
|
||||
logf : 3.737670
|
||||
log10f : 1.623249
|
||||
log1pf : 3.761200
|
||||
log2f : 5.392317
|
||||
logbf : 5.000000
|
||||
lrintf : 0.000000
|
||||
lrintf : 0.000000
|
||||
lroundf : -1.000000
|
||||
lroundf : 1.000000
|
||||
lmodff : 0.000000
|
||||
nanf : nan
|
||||
nearbyintf : 2.000000
|
||||
nextafterf : 1.500000
|
||||
powf : 9.060100
|
||||
remainderf : -0.990000
|
||||
remquof : -1.000000
|
||||
rintf : 0.000000
|
||||
rintf : -0.000000
|
||||
roundf : 1.000000
|
||||
roundf : -1.000000
|
||||
scalblnf : 9.600000
|
||||
scalbnf : 9.600000
|
||||
signbit : 0
|
||||
sinf : 0.707107
|
||||
sinhf : 0.868671
|
||||
sqrtf : 3.000000
|
||||
tanf : 1.000000
|
||||
tanhf : 0.655794
|
||||
tgammaf : 1.046486
|
||||
truncf : 3.000000
|
||||
y0f : 0.228084
|
||||
y1f : -0.621136
|
||||
ynf : -3.589899
|
||||
*** END OF FLOAT MATH TEST ***
|
||||
Reference in new issue
Block a user