1add_libc_testsuite(libc_math_unittests)
2
3function(add_fp_unittest name)
4  cmake_parse_arguments(
5    "MATH_UNITTEST"
6    "NEED_MPFR" # Optional arguments
7    "" # Single value arguments
8    "" # Multi-value arguments
9    ${ARGN}
10  )
11
12  if(MATH_UNITTEST_NEED_MPFR)
13    if(NOT LIBC_TESTS_CAN_USE_MPFR)
14      message("WARNING: Math test ${name} will be skipped as MPFR library is not available.")
15      return()
16    endif()
17  endif()
18
19  add_libc_unittest(${name} ${MATH_UNITTEST_UNPARSED_ARGUMENTS})
20  get_fq_target_name(${name} fq_target_name)
21  if (NOT TARGET ${fq_target_name})
22    return()
23  endif()
24  if(MATH_UNITTEST_NEED_MPFR)
25    target_link_libraries(${fq_target_name} PRIVATE libcMPFRWrapper -lmpfr -lgmp)
26  endif()
27  target_link_libraries(${fq_target_name} PRIVATE LibcFPTestHelpers)
28endfunction(add_fp_unittest)
29
30add_fp_unittest(
31  cosf_test
32  NEED_MPFR
33  SUITE
34    libc_math_unittests
35  SRCS
36    cosf_test.cpp
37  HDRS
38    sdcomp26094.h
39  DEPENDS
40    libc.include.errno
41    libc.src.math.cosf
42    libc.utils.CPP.standalone_cpp
43    libc.utils.FPUtil.fputil
44)
45
46add_fp_unittest(
47  sinf_test
48  NEED_MPFR
49  SUITE
50    libc_math_unittests
51  SRCS
52    sinf_test.cpp
53  HDRS
54    sdcomp26094.h
55  DEPENDS
56    libc.include.errno
57    libc.src.math.sinf
58    libc.utils.CPP.standalone_cpp
59    libc.utils.FPUtil.fputil
60)
61
62add_fp_unittest(
63  sincosf_test
64  NEED_MPFR
65  SUITE
66    libc_math_unittests
67  SRCS
68    sincosf_test.cpp
69  HDRS
70    sdcomp26094.h
71  DEPENDS
72    libc.include.errno
73    libc.src.math.sincosf
74    libc.utils.CPP.standalone_cpp
75    libc.utils.FPUtil.fputil
76)
77
78add_fp_unittest(
79  fabs_test
80  NEED_MPFR
81  SUITE
82    libc_math_unittests
83  SRCS
84    fabs_test.cpp
85  HDRS
86    FAbsTest.h
87  DEPENDS
88    libc.include.math
89    libc.src.math.fabs
90    libc.utils.FPUtil.fputil
91)
92
93add_fp_unittest(
94  fabsf_test
95  NEED_MPFR
96  SUITE
97    libc_math_unittests
98  SRCS
99    fabsf_test.cpp
100  HDRS
101    FAbsTest.h
102  DEPENDS
103    libc.include.math
104    libc.src.math.fabsf
105    libc.utils.FPUtil.fputil
106)
107
108add_fp_unittest(
109  fabsl_test
110  NEED_MPFR
111  SUITE
112    libc_math_unittests
113  SRCS
114    fabsl_test.cpp
115  HDRS
116    FAbsTest.h
117  DEPENDS
118    libc.include.math
119    libc.src.math.fabsl
120    libc.utils.FPUtil.fputil
121)
122
123add_fp_unittest(
124  trunc_test
125  NEED_MPFR
126  SUITE
127    libc_math_unittests
128  SRCS
129    trunc_test.cpp
130  HDRS
131    TruncTest.h
132  DEPENDS
133    libc.include.math
134    libc.src.math.trunc
135    libc.utils.FPUtil.fputil
136)
137
138add_fp_unittest(
139  truncf_test
140  NEED_MPFR
141  SUITE
142    libc_math_unittests
143  SRCS
144    truncf_test.cpp
145  HDRS
146    TruncTest.h
147  DEPENDS
148    libc.include.math
149    libc.src.math.truncf
150    libc.utils.FPUtil.fputil
151)
152
153add_fp_unittest(
154  truncl_test
155  NEED_MPFR
156  SUITE
157    libc_math_unittests
158  SRCS
159    truncl_test.cpp
160  HDRS
161    TruncTest.h
162  DEPENDS
163    libc.include.math
164    libc.src.math.truncl
165    libc.utils.FPUtil.fputil
166)
167
168add_fp_unittest(
169  ceil_test
170  NEED_MPFR
171  SUITE
172    libc_math_unittests
173  SRCS
174    ceil_test.cpp
175  HDRS
176    CeilTest.h
177  DEPENDS
178    libc.include.math
179    libc.src.math.ceil
180    libc.utils.FPUtil.fputil
181)
182
183add_fp_unittest(
184  ceilf_test
185  NEED_MPFR
186  SUITE
187    libc_math_unittests
188  SRCS
189    ceilf_test.cpp
190  HDRS
191    CeilTest.h
192  DEPENDS
193    libc.include.math
194    libc.src.math.ceilf
195    libc.utils.FPUtil.fputil
196)
197
198add_fp_unittest(
199  ceill_test
200  NEED_MPFR
201  SUITE
202    libc_math_unittests
203  SRCS
204    ceill_test.cpp
205  HDRS
206    CeilTest.h
207  DEPENDS
208    libc.include.math
209    libc.src.math.ceill
210    libc.utils.FPUtil.fputil
211)
212
213add_fp_unittest(
214  floor_test
215  NEED_MPFR
216  SUITE
217    libc_math_unittests
218  SRCS
219    floor_test.cpp
220  HDRS
221    FloorTest.h
222  DEPENDS
223    libc.include.math
224    libc.src.math.floor
225    libc.utils.FPUtil.fputil
226)
227
228add_fp_unittest(
229  floorf_test
230  NEED_MPFR
231  SUITE
232    libc_math_unittests
233  SRCS
234    floorf_test.cpp
235  HDRS
236    FloorTest.h
237  DEPENDS
238    libc.include.math
239    libc.src.math.floorf
240    libc.utils.FPUtil.fputil
241)
242
243add_fp_unittest(
244  floorl_test
245  NEED_MPFR
246  SUITE
247    libc_math_unittests
248  SRCS
249    floorl_test.cpp
250  HDRS
251    FloorTest.h
252  DEPENDS
253    libc.include.math
254    libc.src.math.floorl
255    libc.utils.FPUtil.fputil
256)
257
258add_fp_unittest(
259  round_test
260  NEED_MPFR
261  SUITE
262    libc_math_unittests
263  SRCS
264    round_test.cpp
265  HDRS
266    RoundTest.h
267  DEPENDS
268    libc.include.math
269    libc.src.math.round
270    libc.utils.FPUtil.fputil
271)
272
273add_fp_unittest(
274  roundf_test
275  NEED_MPFR
276  SUITE
277    libc_math_unittests
278  SRCS
279    roundf_test.cpp
280  HDRS
281    RoundTest.h
282  DEPENDS
283    libc.include.math
284    libc.src.math.roundf
285    libc.utils.FPUtil.fputil
286)
287
288add_fp_unittest(
289  roundl_test
290  NEED_MPFR
291  SUITE
292    libc_math_unittests
293  SRCS
294    roundl_test.cpp
295  HDRS
296    RoundTest.h
297  DEPENDS
298    libc.include.math
299    libc.src.math.roundl
300    libc.utils.FPUtil.fputil
301)
302
303add_fp_unittest(
304  lround_test
305  NEED_MPFR
306  SUITE
307    libc_math_unittests
308  SRCS
309    lround_test.cpp
310  HDRS
311    RoundToIntegerTest.h
312  DEPENDS
313    libc.include.errno
314    libc.include.math
315    libc.src.errno.__errno_location
316    libc.src.fenv.feclearexcept
317    libc.src.fenv.feraiseexcept
318    libc.src.fenv.fetestexcept
319    libc.src.math.lround
320    libc.utils.FPUtil.fputil
321)
322
323add_fp_unittest(
324  lroundf_test
325  NEED_MPFR
326  SUITE
327    libc_math_unittests
328  SRCS
329    lroundf_test.cpp
330  HDRS
331    RoundToIntegerTest.h
332  DEPENDS
333    libc.include.errno
334    libc.include.math
335    libc.src.errno.__errno_location
336    libc.src.fenv.feclearexcept
337    libc.src.fenv.feraiseexcept
338    libc.src.fenv.fetestexcept
339    libc.src.math.lroundf
340    libc.utils.FPUtil.fputil
341)
342
343add_fp_unittest(
344  lroundl_test
345  NEED_MPFR
346  SUITE
347    libc_math_unittests
348  SRCS
349    lroundl_test.cpp
350  HDRS
351    RoundToIntegerTest.h
352  DEPENDS
353    libc.include.errno
354    libc.include.math
355    libc.src.errno.__errno_location
356    libc.src.fenv.feclearexcept
357    libc.src.fenv.feraiseexcept
358    libc.src.fenv.fetestexcept
359    libc.src.math.lroundl
360    libc.utils.FPUtil.fputil
361)
362
363add_fp_unittest(
364  llround_test
365  NEED_MPFR
366  SUITE
367    libc_math_unittests
368  SRCS
369    llround_test.cpp
370  HDRS
371    RoundToIntegerTest.h
372  DEPENDS
373    libc.include.errno
374    libc.include.math
375    libc.src.errno.__errno_location
376    libc.src.fenv.feclearexcept
377    libc.src.fenv.feraiseexcept
378    libc.src.fenv.fetestexcept
379    libc.src.math.llround
380    libc.utils.FPUtil.fputil
381)
382
383add_fp_unittest(
384  llroundf_test
385  NEED_MPFR
386  SUITE
387    libc_math_unittests
388  SRCS
389    llroundf_test.cpp
390  HDRS
391    RoundToIntegerTest.h
392  DEPENDS
393    libc.include.errno
394    libc.include.math
395    libc.src.errno.__errno_location
396    libc.src.fenv.feclearexcept
397    libc.src.fenv.feraiseexcept
398    libc.src.fenv.fetestexcept
399    libc.src.math.llroundf
400    libc.utils.FPUtil.fputil
401)
402
403add_fp_unittest(
404  llroundl_test
405  NEED_MPFR
406  SUITE
407    libc_math_unittests
408  SRCS
409    llroundl_test.cpp
410  HDRS
411    RoundToIntegerTest.h
412  DEPENDS
413    libc.include.errno
414    libc.include.math
415    libc.src.errno.__errno_location
416    libc.src.fenv.feclearexcept
417    libc.src.fenv.feraiseexcept
418    libc.src.fenv.fetestexcept
419    libc.src.math.llroundl
420    libc.utils.FPUtil.fputil
421)
422
423add_fp_unittest(
424  rint_test
425  NEED_MPFR
426  SUITE
427    libc_math_unittests
428  SRCS
429    rint_test.cpp
430  HDRS
431    RIntTest.h
432  DEPENDS
433    libc.include.math
434    libc.src.math.rint
435    libc.utils.FPUtil.fputil
436)
437
438add_fp_unittest(
439  rintf_test
440  NEED_MPFR
441  SUITE
442    libc_math_unittests
443  SRCS
444    rintf_test.cpp
445  HDRS
446    RIntTest.h
447  DEPENDS
448    libc.include.math
449    libc.src.math.rintf
450    libc.utils.FPUtil.fputil
451)
452
453add_fp_unittest(
454  rintl_test
455  NEED_MPFR
456  SUITE
457    libc_math_unittests
458  SRCS
459    rintl_test.cpp
460  HDRS
461    RIntTest.h
462  DEPENDS
463    libc.include.math
464    libc.src.math.rintl
465    libc.utils.FPUtil.fputil
466)
467
468add_fp_unittest(
469  lrint_test
470  NEED_MPFR
471  SUITE
472    libc_math_unittests
473  SRCS
474    lrint_test.cpp
475  HDRS
476    RoundToIntegerTest.h
477  DEPENDS
478    libc.include.math
479    libc.src.math.lrint
480    libc.utils.FPUtil.fputil
481)
482
483add_fp_unittest(
484  lrintf_test
485  NEED_MPFR
486  SUITE
487    libc_math_unittests
488  SRCS
489    lrintf_test.cpp
490  HDRS
491    RoundToIntegerTest.h
492  DEPENDS
493    libc.include.math
494    libc.src.math.lrintf
495    libc.utils.FPUtil.fputil
496)
497
498add_fp_unittest(
499  lrintl_test
500  NEED_MPFR
501  SUITE
502    libc_math_unittests
503  SRCS
504    lrintl_test.cpp
505  HDRS
506    RoundToIntegerTest.h
507  DEPENDS
508    libc.include.math
509    libc.src.math.lrintl
510    libc.utils.FPUtil.fputil
511)
512
513add_fp_unittest(
514  llrint_test
515  NEED_MPFR
516  SUITE
517    libc_math_unittests
518  SRCS
519    llrint_test.cpp
520  HDRS
521    RoundToIntegerTest.h
522  DEPENDS
523    libc.include.math
524    libc.src.math.llrint
525    libc.utils.FPUtil.fputil
526)
527
528add_fp_unittest(
529  llrintf_test
530  NEED_MPFR
531  SUITE
532    libc_math_unittests
533  SRCS
534    llrintf_test.cpp
535  HDRS
536    RoundToIntegerTest.h
537  DEPENDS
538    libc.include.math
539    libc.src.math.llrintf
540    libc.utils.FPUtil.fputil
541)
542
543add_fp_unittest(
544  llrintl_test
545  NEED_MPFR
546  SUITE
547    libc_math_unittests
548  SRCS
549    llrintl_test.cpp
550  HDRS
551    RoundToIntegerTest.h
552  DEPENDS
553    libc.include.math
554    libc.src.math.llrintl
555    libc.utils.FPUtil.fputil
556)
557
558add_fp_unittest(
559  expf_test
560  NEED_MPFR
561  SUITE
562    libc_math_unittests
563  SRCS
564    expf_test.cpp
565  DEPENDS
566    libc.include.errno
567    libc.include.math
568    libc.src.math.expf
569    libc.utils.FPUtil.fputil
570)
571
572add_fp_unittest(
573  exp2f_test
574  NEED_MPFR
575  SUITE
576    libc_math_unittests
577  SRCS
578    exp2f_test.cpp
579  DEPENDS
580    libc.include.errno
581    libc.include.math
582    libc.src.math.exp2f
583    libc.utils.FPUtil.fputil
584)
585
586add_fp_unittest(
587  copysign_test
588  SUITE
589    libc_math_unittests
590  SRCS
591    copysign_test.cpp
592  HDRS
593    CopySignTest.h
594  DEPENDS
595    libc.include.math
596    libc.src.math.copysign
597    libc.utils.FPUtil.fputil
598)
599
600add_fp_unittest(
601  copysignf_test
602  SUITE
603    libc_math_unittests
604  SRCS
605    copysignf_test.cpp
606  HDRS
607    CopySignTest.h
608  DEPENDS
609    libc.include.math
610    libc.src.math.copysignf
611    libc.utils.FPUtil.fputil
612)
613
614add_fp_unittest(
615  copysignl_test
616  SUITE
617    libc_math_unittests
618  SRCS
619    copysignl_test.cpp
620  HDRS
621    CopySignTest.h
622  DEPENDS
623    libc.include.math
624    libc.src.math.copysignl
625    libc.utils.FPUtil.fputil
626)
627
628add_fp_unittest(
629  frexp_test
630  NEED_MPFR
631  SUITE
632    libc_math_unittests
633  SRCS
634    frexp_test.cpp
635  DEPENDS
636    libc.include.math
637    libc.src.math.frexp
638    libc.utils.FPUtil.fputil
639)
640
641add_fp_unittest(
642  frexpf_test
643  NEED_MPFR
644  SUITE
645    libc_math_unittests
646  SRCS
647    frexpf_test.cpp
648  DEPENDS
649    libc.include.math
650    libc.src.math.frexpf
651    libc.utils.FPUtil.fputil
652)
653
654add_fp_unittest(
655  frexpl_test
656  NEED_MPFR
657  SUITE
658    libc_math_unittests
659  SRCS
660    frexpl_test.cpp
661  DEPENDS
662    libc.include.math
663    libc.src.math.frexpl
664    libc.utils.FPUtil.fputil
665)
666
667add_fp_unittest(
668  ilogb_test
669  SUITE
670    libc_math_unittests
671  SRCS
672    ilogb_test.cpp
673  HDRS
674    ILogbTest.h
675  DEPENDS
676    libc.include.math
677    libc.src.math.ilogb
678    libc.utils.FPUtil.fputil
679)
680
681add_fp_unittest(
682  ilogbf_test
683  SUITE
684    libc_math_unittests
685  SRCS
686    ilogbf_test.cpp
687  HDRS
688    ILogbTest.h
689  DEPENDS
690    libc.include.math
691    libc.src.math.ilogbf
692    libc.utils.FPUtil.fputil
693)
694
695add_fp_unittest(
696  ilogbl_test
697  SUITE
698    libc_math_unittests
699  SRCS
700    ilogbl_test.cpp
701  HDRS
702    ILogbTest.h
703  DEPENDS
704    libc.include.math
705    libc.src.math.ilogbl
706    libc.utils.FPUtil.fputil
707)
708
709add_fp_unittest(
710  ldexp_test
711  SUITE
712    libc_math_unittests
713  SRCS
714    ldexp_test.cpp
715  HDRS
716    LdExpTest.h
717  DEPENDS
718    libc.include.math
719    libc.src.math.ldexp
720    libc.utils.FPUtil.fputil
721)
722
723add_fp_unittest(
724  ldexpf_test
725  SUITE
726    libc_math_unittests
727  SRCS
728    ldexpf_test.cpp
729  HDRS
730    LdExpTest.h
731  DEPENDS
732    libc.include.math
733    libc.src.math.ldexpf
734    libc.utils.FPUtil.fputil
735)
736
737add_fp_unittest(
738  ldexpl_test
739  SUITE
740    libc_math_unittests
741  SRCS
742    ldexpl_test.cpp
743  HDRS
744    LdExpTest.h
745  DEPENDS
746    libc.include.math
747    libc.src.math.ldexpl
748    libc.utils.FPUtil.fputil
749)
750
751add_fp_unittest(
752  logb_test
753  SUITE
754    libc_math_unittests
755  SRCS
756    logb_test.cpp
757  DEPENDS
758    libc.include.math
759    libc.src.math.logb
760    libc.utils.FPUtil.fputil
761)
762
763add_fp_unittest(
764  logbf_test
765  SUITE
766    libc_math_unittests
767  SRCS
768    logbf_test.cpp
769  DEPENDS
770    libc.include.math
771    libc.src.math.logbf
772    libc.utils.FPUtil.fputil
773)
774
775add_fp_unittest(
776  logbl_test
777  SUITE
778    libc_math_unittests
779  SRCS
780    logbl_test.cpp
781  DEPENDS
782    libc.include.math
783    libc.src.math.logbl
784    libc.utils.FPUtil.fputil
785)
786
787add_fp_unittest(
788  modf_test
789  SUITE
790    libc_math_unittests
791  SRCS
792    modf_test.cpp
793  DEPENDS
794    libc.include.math
795    libc.src.math.modf
796    libc.utils.FPUtil.fputil
797)
798
799add_fp_unittest(
800  modff_test
801  SUITE
802    libc_math_unittests
803  SRCS
804    modff_test.cpp
805  DEPENDS
806    libc.include.math
807    libc.src.math.modff
808    libc.utils.FPUtil.fputil
809)
810
811add_fp_unittest(
812  modfl_test
813  SUITE
814    libc_math_unittests
815  SRCS
816    modfl_test.cpp
817  DEPENDS
818    libc.include.math
819    libc.src.math.modfl
820    libc.utils.FPUtil.fputil
821)
822
823add_fp_unittest(
824  fdimf_test
825  SUITE
826    libc_math_unittests
827  SRCS
828    fdimf_test.cpp
829  HDRS
830    FDimTest.h
831  DEPENDS
832    libc.include.math
833    libc.src.math.fdimf
834    libc.utils.FPUtil.fputil
835)
836
837add_fp_unittest(
838  fdim_test
839  SUITE
840    libc_math_unittests
841  SRCS
842    fdim_test.cpp
843  HDRS
844    FDimTest.h
845  DEPENDS
846    libc.include.math
847    libc.src.math.fdim
848    libc.utils.FPUtil.fputil
849)
850
851add_fp_unittest(
852  fdiml_test
853  SUITE
854    libc_math_unittests
855  SRCS
856    fdiml_test.cpp
857  HDRS
858    FDimTest.h
859  DEPENDS
860    libc.include.math
861    libc.src.math.fdiml
862    libc.utils.FPUtil.fputil
863)
864
865add_fp_unittest(
866  fminf_test
867  SUITE
868    libc_math_unittests
869  SRCS
870    fminf_test.cpp
871  HDRS
872    FMinTest.h
873  DEPENDS
874    libc.include.math
875    libc.src.math.fminf
876    libc.utils.FPUtil.fputil
877)
878
879add_fp_unittest(
880  fmin_test
881  SUITE
882    libc_math_unittests
883  SRCS
884    fmin_test.cpp
885  HDRS
886    FMinTest.h
887  DEPENDS
888    libc.include.math
889    libc.src.math.fmin
890    libc.utils.FPUtil.fputil
891)
892
893add_fp_unittest(
894  fminl_test
895  SUITE
896    libc_math_unittests
897  SRCS
898    fminl_test.cpp
899  HDRS
900    FMinTest.h
901  DEPENDS
902    libc.include.math
903    libc.src.math.fminl
904    libc.utils.FPUtil.fputil
905)
906
907add_fp_unittest(
908  fmaxf_test
909  SUITE
910    libc_math_unittests
911  SRCS
912    fmaxf_test.cpp
913  HDRS
914    FMaxTest.h
915  DEPENDS
916    libc.include.math
917    libc.src.math.fmaxf
918    libc.utils.FPUtil.fputil
919)
920
921add_fp_unittest(
922  fmax_test
923  SUITE
924    libc_math_unittests
925  SRCS
926    fmax_test.cpp
927  HDRS
928    FMaxTest.h
929  DEPENDS
930    libc.include.math
931    libc.src.math.fmax
932    libc.utils.FPUtil.fputil
933)
934
935add_fp_unittest(
936  fmaxl_test
937  SUITE
938    libc_math_unittests
939  SRCS
940    fmaxl_test.cpp
941  HDRS
942    FMaxTest.h
943  DEPENDS
944    libc.include.math
945    libc.src.math.fmaxl
946    libc.utils.FPUtil.fputil
947)
948
949add_fp_unittest(
950  sqrtf_test
951  NEED_MPFR
952  SUITE
953    libc_math_unittests
954  SRCS
955    sqrtf_test.cpp
956  DEPENDS
957    libc.include.math
958    libc.src.math.sqrtf
959    libc.utils.FPUtil.fputil
960)
961
962add_fp_unittest(
963  sqrt_test
964  NEED_MPFR
965  SUITE
966    libc_math_unittests
967  SRCS
968    sqrt_test.cpp
969  DEPENDS
970    libc.include.math
971    libc.src.math.sqrt
972    libc.utils.FPUtil.fputil
973)
974
975# The quad precision test for sqrt against MPFR currently suffers
976# from insufficient precision in MPFR calculations leading to
977# https://hal.archives-ouvertes.fr/hal-01091186/document. We will
978# renable after fixing the precision issue.
979if(${LIBC_TARGET_MACHINE} MATCHES "x86_64")
980  add_fp_unittest(
981    sqrtl_test
982    NEED_MPFR
983    SUITE
984      libc_math_unittests
985    SRCS
986      sqrtl_test.cpp
987    DEPENDS
988      libc.include.math
989      libc.src.math.sqrtl
990      libc.utils.FPUtil.fputil
991  )
992else()
993  message(STATUS "Skipping sqrtl_test")
994endif()
995
996add_fp_unittest(
997  remquof_test
998  NEED_MPFR
999  SUITE
1000    libc_math_unittests
1001  SRCS
1002    remquof_test.cpp
1003  HDRS
1004    RemQuoTest.h
1005  DEPENDS
1006    libc.include.math
1007    libc.src.math.remquof
1008    libc.utils.FPUtil.fputil
1009)
1010
1011add_fp_unittest(
1012  remquo_test
1013  NEED_MPFR
1014  SUITE
1015    libc_math_unittests
1016  SRCS
1017    remquo_test.cpp
1018  HDRS
1019    RemQuoTest.h
1020  DEPENDS
1021    libc.include.math
1022    libc.src.math.remquo
1023    libc.utils.FPUtil.fputil
1024)
1025
1026add_fp_unittest(
1027  remquol_test
1028  NEED_MPFR
1029  SUITE
1030    libc_math_unittests
1031  SRCS
1032    remquol_test.cpp
1033  HDRS
1034    RemQuoTest.h
1035  DEPENDS
1036    libc.include.math
1037    libc.src.math.remquol
1038    libc.utils.FPUtil.fputil
1039)
1040
1041add_fp_unittest(
1042  hypotf_test
1043  NEED_MPFR
1044  SUITE
1045    libc_math_unittests
1046  SRCS
1047    hypotf_test.cpp
1048  DEPENDS
1049    libc.include.math
1050    libc.src.math.hypotf
1051    libc.utils.FPUtil.fputil
1052)
1053
1054add_fp_unittest(
1055  hypot_test
1056  NEED_MPFR
1057  SUITE
1058    libc_math_unittests
1059  SRCS
1060    hypot_test.cpp
1061  DEPENDS
1062    libc.include.math
1063    libc.src.math.hypot
1064    libc.utils.FPUtil.fputil
1065)
1066
1067add_fp_unittest(
1068  nextafter_test
1069  SUITE
1070    libc_math_unittests
1071  SRCS
1072    nextafter_test.cpp
1073  HDRS
1074    NextAfterTest.h
1075  DEPENDS
1076    libc.include.math
1077    libc.src.math.nextafter
1078    libc.utils.FPUtil.fputil
1079)
1080
1081add_fp_unittest(
1082  nextafterf_test
1083  SUITE
1084    libc_math_unittests
1085  SRCS
1086    nextafterf_test.cpp
1087  HDRS
1088    NextAfterTest.h
1089  DEPENDS
1090    libc.include.math
1091    libc.src.math.nextafterf
1092    libc.utils.FPUtil.fputil
1093)
1094
1095add_fp_unittest(
1096  nextafterl_test
1097  SUITE
1098    libc_math_unittests
1099  SRCS
1100    nextafterl_test.cpp
1101  HDRS
1102    NextAfterTest.h
1103  DEPENDS
1104    libc.include.math
1105    libc.src.math.nextafterl
1106    libc.utils.FPUtil.fputil
1107)
1108
1109add_fp_unittest(
1110  fmaf_test
1111  NEED_MPFR
1112  SUITE
1113    libc_math_unittests
1114  SRCS
1115    fmaf_test.cpp
1116  DEPENDS
1117    libc.include.math
1118    libc.src.math.fmaf
1119    libc.utils.FPUtil.fputil
1120)
1121
1122add_fp_unittest(
1123  fma_test
1124  NEED_MPFR
1125  SUITE
1126    libc_math_unittests
1127  SRCS
1128    fma_test.cpp
1129  DEPENDS
1130    libc.include.math
1131    libc.src.math.fma
1132    libc.utils.FPUtil.fputil
1133)
1134
1135add_subdirectory(generic)
1136add_subdirectory(exhaustive)
1137add_subdirectory(differential_testing)
1138