1 /* $NetBSD: t_log.c,v 1.8 2012/04/08 09:36:04 jruoho Exp $ */
4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
31 #include <sys/cdefs.h>
32 __RCSID("$NetBSD: t_log.c,v 1.8 2012/04/08 09:36:04 jruoho Exp $");
35 #include <atf-c/config.h>
45 ATF_TC_HEAD(log10_base
, tc
)
47 atf_tc_set_md_var(tc
, "descr", "Test log10(10) == 1");
50 ATF_TC_BODY(log10_base
, tc
)
52 ATF_CHECK(log10(10.0) == 1.0);
56 ATF_TC_HEAD(log10_nan
, tc
)
58 atf_tc_set_md_var(tc
, "descr", "Test log10(NaN) == NaN");
61 ATF_TC_BODY(log10_nan
, tc
)
64 const double x
= 0.0L / 0.0L;
66 ATF_CHECK(isnan(x
) != 0);
67 ATF_CHECK(isnan(log10(x
)) != 0);
71 ATF_TC(log10_inf_neg
);
72 ATF_TC_HEAD(log10_inf_neg
, tc
)
74 atf_tc_set_md_var(tc
, "descr", "Test log10(-Inf) == NaN");
77 ATF_TC_BODY(log10_inf_neg
, tc
)
80 const double x
= -1.0L / 0.0L;
81 const double y
= log10(x
);
83 ATF_CHECK(isnan(y
) != 0);
87 ATF_TC(log10_inf_pos
);
88 ATF_TC_HEAD(log10_inf_pos
, tc
)
90 atf_tc_set_md_var(tc
, "descr", "Test log10(+Inf) == +Inf");
93 ATF_TC_BODY(log10_inf_pos
, tc
)
96 const double x
= 1.0L / 0.0L;
98 ATF_CHECK(log10(x
) == x
);
102 ATF_TC(log10_one_pos
);
103 ATF_TC_HEAD(log10_one_pos
, tc
)
105 atf_tc_set_md_var(tc
, "descr", "Test log10(1.0) == +0.0");
108 ATF_TC_BODY(log10_one_pos
, tc
)
111 const double x
= log10(1.0);
112 const double y
= 0.0L;
115 ATF_CHECK(signbit(x
) == 0);
116 ATF_CHECK(signbit(y
) == 0);
120 ATF_TC(log10_zero_neg
);
121 ATF_TC_HEAD(log10_zero_neg
, tc
)
123 atf_tc_set_md_var(tc
, "descr", "Test log10(-0.0) == -HUGE_VAL");
126 ATF_TC_BODY(log10_zero_neg
, tc
)
129 const double x
= -0.0L;
131 ATF_CHECK(log10(x
) == -HUGE_VAL
);
135 ATF_TC(log10_zero_pos
);
136 ATF_TC_HEAD(log10_zero_pos
, tc
)
138 atf_tc_set_md_var(tc
, "descr", "Test log10(+0.0) == -HUGE_VAL");
141 ATF_TC_BODY(log10_zero_pos
, tc
)
144 const double x
= 0.0L;
146 ATF_CHECK(log10(x
) == -HUGE_VAL
);
154 ATF_TC_HEAD(log10f_base
, tc
)
156 atf_tc_set_md_var(tc
, "descr", "Test log10f(10) == 1");
159 ATF_TC_BODY(log10f_base
, tc
)
161 ATF_CHECK(log10f(10.0) == 1.0);
165 ATF_TC_HEAD(log10f_nan
, tc
)
167 atf_tc_set_md_var(tc
, "descr", "Test log10f(NaN) == NaN");
170 ATF_TC_BODY(log10f_nan
, tc
)
173 const float x
= 0.0L / 0.0L;
175 ATF_CHECK(isnan(x
) != 0);
176 ATF_CHECK(isnan(log10f(x
)) != 0);
180 ATF_TC(log10f_inf_neg
);
181 ATF_TC_HEAD(log10f_inf_neg
, tc
)
183 atf_tc_set_md_var(tc
, "descr", "Test log10f(-Inf) == NaN");
186 ATF_TC_BODY(log10f_inf_neg
, tc
)
189 const float x
= -1.0L / 0.0L;
190 const float y
= log10f(x
);
192 ATF_CHECK(isnan(y
) != 0);
196 ATF_TC(log10f_inf_pos
);
197 ATF_TC_HEAD(log10f_inf_pos
, tc
)
199 atf_tc_set_md_var(tc
, "descr", "Test log10f(+Inf) == +Inf");
202 ATF_TC_BODY(log10f_inf_pos
, tc
)
205 const float x
= 1.0L / 0.0L;
207 if (strcmp(atf_config_get("atf_arch"), "alpha") == 0)
208 atf_tc_expect_fail("PR port-alpha/46301");
210 ATF_CHECK(log10f(x
) == x
);
214 ATF_TC(log10f_one_pos
);
215 ATF_TC_HEAD(log10f_one_pos
, tc
)
217 atf_tc_set_md_var(tc
, "descr", "Test log10f(1.0) == +0.0");
220 ATF_TC_BODY(log10f_one_pos
, tc
)
223 const float x
= log10f(1.0);
224 const float y
= 0.0L;
227 ATF_CHECK(signbit(x
) == 0);
228 ATF_CHECK(signbit(y
) == 0);
232 ATF_TC(log10f_zero_neg
);
233 ATF_TC_HEAD(log10f_zero_neg
, tc
)
235 atf_tc_set_md_var(tc
, "descr", "Test log10f(-0.0) == -HUGE_VALF");
238 ATF_TC_BODY(log10f_zero_neg
, tc
)
241 const float x
= -0.0L;
243 ATF_CHECK(log10f(x
) == -HUGE_VALF
);
247 ATF_TC(log10f_zero_pos
);
248 ATF_TC_HEAD(log10f_zero_pos
, tc
)
250 atf_tc_set_md_var(tc
, "descr", "Test log10f(+0.0) == -HUGE_VALF");
253 ATF_TC_BODY(log10f_zero_pos
, tc
)
256 const float x
= 0.0L;
258 ATF_CHECK(log10f(x
) == -HUGE_VALF
);
266 ATF_TC_HEAD(log1p_nan
, tc
)
268 atf_tc_set_md_var(tc
, "descr", "Test log1p(NaN) == NaN");
271 ATF_TC_BODY(log1p_nan
, tc
)
274 const double x
= 0.0L / 0.0L;
276 ATF_CHECK(isnan(x
) != 0);
277 ATF_CHECK(isnan(log1p(x
)) != 0);
281 ATF_TC(log1p_inf_neg
);
282 ATF_TC_HEAD(log1p_inf_neg
, tc
)
284 atf_tc_set_md_var(tc
, "descr", "Test log1p(-Inf) == NaN");
287 ATF_TC_BODY(log1p_inf_neg
, tc
)
290 const double x
= -1.0L / 0.0L;
291 const double y
= log1p(x
);
294 atf_tc_expect_fail("PR lib/45362");
295 atf_tc_fail("log1p(-Inf) != NaN");
300 ATF_TC(log1p_inf_pos
);
301 ATF_TC_HEAD(log1p_inf_pos
, tc
)
303 atf_tc_set_md_var(tc
, "descr", "Test log1p(+Inf) == +Inf");
306 ATF_TC_BODY(log1p_inf_pos
, tc
)
309 const double x
= 1.0L / 0.0L;
311 ATF_CHECK(log1p(x
) == x
);
315 ATF_TC(log1p_one_neg
);
316 ATF_TC_HEAD(log1p_one_neg
, tc
)
318 atf_tc_set_md_var(tc
, "descr", "Test log1p(-1.0) == -HUGE_VAL");
321 ATF_TC_BODY(log1p_one_neg
, tc
)
324 const double x
= log1p(-1.0);
326 if (x
!= -HUGE_VAL
) {
327 atf_tc_expect_fail("PR lib/45362");
328 atf_tc_fail("log1p(-1.0) != -HUGE_VAL");
333 ATF_TC(log1p_zero_neg
);
334 ATF_TC_HEAD(log1p_zero_neg
, tc
)
336 atf_tc_set_md_var(tc
, "descr", "Test log1p(-0.0) == -0.0");
339 ATF_TC_BODY(log1p_zero_neg
, tc
)
342 const double x
= -0.0L;
344 ATF_CHECK(log1p(x
) == x
);
348 ATF_TC(log1p_zero_pos
);
349 ATF_TC_HEAD(log1p_zero_pos
, tc
)
351 atf_tc_set_md_var(tc
, "descr", "Test log1p(+0.0) == +0.0");
354 ATF_TC_BODY(log1p_zero_pos
, tc
)
357 const double x
= 0.0L;
359 ATF_CHECK(log1p(x
) == x
);
367 ATF_TC_HEAD(log1pf_nan
, tc
)
369 atf_tc_set_md_var(tc
, "descr", "Test log1pf(NaN) == NaN");
372 ATF_TC_BODY(log1pf_nan
, tc
)
375 const float x
= 0.0L / 0.0L;
377 ATF_CHECK(isnan(x
) != 0);
378 ATF_CHECK(isnan(log1pf(x
)) != 0);
382 ATF_TC(log1pf_inf_neg
);
383 ATF_TC_HEAD(log1pf_inf_neg
, tc
)
385 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-Inf) == NaN");
388 ATF_TC_BODY(log1pf_inf_neg
, tc
)
391 const float x
= -1.0L / 0.0L;
392 const float y
= log1pf(x
);
395 atf_tc_expect_fail("PR lib/45362");
396 atf_tc_fail("log1pf(-Inf) != NaN");
401 ATF_TC(log1pf_inf_pos
);
402 ATF_TC_HEAD(log1pf_inf_pos
, tc
)
404 atf_tc_set_md_var(tc
, "descr", "Test log1pf(+Inf) == +Inf");
407 ATF_TC_BODY(log1pf_inf_pos
, tc
)
410 const float x
= 1.0L / 0.0L;
412 ATF_CHECK(log1pf(x
) == x
);
416 ATF_TC(log1pf_one_neg
);
417 ATF_TC_HEAD(log1pf_one_neg
, tc
)
419 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-1.0) == -HUGE_VALF");
422 ATF_TC_BODY(log1pf_one_neg
, tc
)
425 const float x
= log1pf(-1.0);
427 if (x
!= -HUGE_VALF
) {
428 atf_tc_expect_fail("PR lib/45362");
429 atf_tc_fail("log1pf(-1.0) != -HUGE_VALF");
434 ATF_TC(log1pf_zero_neg
);
435 ATF_TC_HEAD(log1pf_zero_neg
, tc
)
437 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-0.0) == -0.0");
440 ATF_TC_BODY(log1pf_zero_neg
, tc
)
443 const float x
= -0.0L;
445 ATF_CHECK(log1pf(x
) == x
);
449 ATF_TC(log1pf_zero_pos
);
450 ATF_TC_HEAD(log1pf_zero_pos
, tc
)
452 atf_tc_set_md_var(tc
, "descr", "Test log1pf(+0.0) == +0.0");
455 ATF_TC_BODY(log1pf_zero_pos
, tc
)
458 const float x
= 0.0L;
460 ATF_CHECK(log1pf(x
) == x
);
468 ATF_TC_HEAD(log2_base
, tc
)
470 atf_tc_set_md_var(tc
, "descr", "Test log2(2) == 1");
473 ATF_TC_BODY(log2_base
, tc
)
475 ATF_CHECK(log2(2.0) == 1.0);
479 ATF_TC_HEAD(log2_nan
, tc
)
481 atf_tc_set_md_var(tc
, "descr", "Test log2(NaN) == NaN");
484 ATF_TC_BODY(log2_nan
, tc
)
487 const double x
= 0.0L / 0.0L;
489 ATF_CHECK(isnan(x
) != 0);
490 ATF_CHECK(isnan(log2(x
)) != 0);
494 ATF_TC(log2_inf_neg
);
495 ATF_TC_HEAD(log2_inf_neg
, tc
)
497 atf_tc_set_md_var(tc
, "descr", "Test log2(-Inf) == NaN");
500 ATF_TC_BODY(log2_inf_neg
, tc
)
503 const double x
= -1.0L / 0.0L;
504 const double y
= log2(x
);
506 ATF_CHECK(isnan(y
) != 0);
510 ATF_TC(log2_inf_pos
);
511 ATF_TC_HEAD(log2_inf_pos
, tc
)
513 atf_tc_set_md_var(tc
, "descr", "Test log2(+Inf) == +Inf");
516 ATF_TC_BODY(log2_inf_pos
, tc
)
519 const double x
= 1.0L / 0.0L;
521 ATF_CHECK(log2(x
) == x
);
525 ATF_TC(log2_one_pos
);
526 ATF_TC_HEAD(log2_one_pos
, tc
)
528 atf_tc_set_md_var(tc
, "descr", "Test log2(1.0) == +0.0");
531 ATF_TC_BODY(log2_one_pos
, tc
)
534 const double x
= log2(1.0);
535 const double y
= 0.0L;
538 ATF_CHECK(signbit(x
) == 0);
539 ATF_CHECK(signbit(y
) == 0);
543 ATF_TC(log2_zero_neg
);
544 ATF_TC_HEAD(log2_zero_neg
, tc
)
546 atf_tc_set_md_var(tc
, "descr", "Test log2(-0.0) == -HUGE_VAL");
549 ATF_TC_BODY(log2_zero_neg
, tc
)
552 const double x
= -0.0L;
554 ATF_CHECK(log2(x
) == -HUGE_VAL
);
558 ATF_TC(log2_zero_pos
);
559 ATF_TC_HEAD(log2_zero_pos
, tc
)
561 atf_tc_set_md_var(tc
, "descr", "Test log2(+0.0) == -HUGE_VAL");
564 ATF_TC_BODY(log2_zero_pos
, tc
)
567 const double x
= 0.0L;
569 ATF_CHECK(log2(x
) == -HUGE_VAL
);
577 ATF_TC_HEAD(log2f_base
, tc
)
579 atf_tc_set_md_var(tc
, "descr", "Test log2f(2) == 1");
582 ATF_TC_BODY(log2f_base
, tc
)
584 ATF_CHECK(log2f(2.0) == 1.0);
588 ATF_TC_HEAD(log2f_nan
, tc
)
590 atf_tc_set_md_var(tc
, "descr", "Test log2f(NaN) == NaN");
593 ATF_TC_BODY(log2f_nan
, tc
)
596 const float x
= 0.0L / 0.0L;
598 ATF_CHECK(isnan(x
) != 0);
599 ATF_CHECK(isnan(log2f(x
)) != 0);
603 ATF_TC(log2f_inf_neg
);
604 ATF_TC_HEAD(log2f_inf_neg
, tc
)
606 atf_tc_set_md_var(tc
, "descr", "Test log2f(-Inf) == NaN");
609 ATF_TC_BODY(log2f_inf_neg
, tc
)
612 const float x
= -1.0L / 0.0L;
613 const float y
= log2f(x
);
615 ATF_CHECK(isnan(y
) != 0);
619 ATF_TC(log2f_inf_pos
);
620 ATF_TC_HEAD(log2f_inf_pos
, tc
)
622 atf_tc_set_md_var(tc
, "descr", "Test log2f(+Inf) == +Inf");
625 ATF_TC_BODY(log2f_inf_pos
, tc
)
628 const float x
= 1.0L / 0.0L;
630 if (strcmp(atf_config_get("atf_arch"), "alpha") == 0)
631 atf_tc_expect_fail("PR port-alpha/46301");
633 ATF_CHECK(log2f(x
) == x
);
637 ATF_TC(log2f_one_pos
);
638 ATF_TC_HEAD(log2f_one_pos
, tc
)
640 atf_tc_set_md_var(tc
, "descr", "Test log2f(1.0) == +0.0");
643 ATF_TC_BODY(log2f_one_pos
, tc
)
646 const float x
= log2f(1.0);
647 const float y
= 0.0L;
650 ATF_CHECK(signbit(x
) == 0);
651 ATF_CHECK(signbit(y
) == 0);
655 ATF_TC(log2f_zero_neg
);
656 ATF_TC_HEAD(log2f_zero_neg
, tc
)
658 atf_tc_set_md_var(tc
, "descr", "Test log2f(-0.0) == -HUGE_VALF");
661 ATF_TC_BODY(log2f_zero_neg
, tc
)
664 const float x
= -0.0L;
666 ATF_CHECK(log2f(x
) == -HUGE_VALF
);
670 ATF_TC(log2f_zero_pos
);
671 ATF_TC_HEAD(log2f_zero_pos
, tc
)
673 atf_tc_set_md_var(tc
, "descr", "Test log2f(+0.0) == -HUGE_VALF");
676 ATF_TC_BODY(log2f_zero_pos
, tc
)
679 const float x
= 0.0L;
681 ATF_CHECK(log2f(x
) == -HUGE_VALF
);
689 ATF_TC_HEAD(log_base
, tc
)
691 atf_tc_set_md_var(tc
, "descr", "Test log(e) == 1");
694 ATF_TC_BODY(log_base
, tc
)
696 const double eps
= 1.0e-38;
698 if (fabs(log(M_E
) - 1.0) > eps
)
699 atf_tc_fail_nonfatal("log(e) != 1");
703 ATF_TC_HEAD(log_nan
, tc
)
705 atf_tc_set_md_var(tc
, "descr", "Test log(NaN) == NaN");
708 ATF_TC_BODY(log_nan
, tc
)
711 const double x
= 0.0L / 0.0L;
713 ATF_CHECK(isnan(x
) != 0);
714 ATF_CHECK(isnan(log(x
)) != 0);
719 ATF_TC_HEAD(log_inf_neg
, tc
)
721 atf_tc_set_md_var(tc
, "descr", "Test log(-Inf) == NaN");
724 ATF_TC_BODY(log_inf_neg
, tc
)
727 const double x
= -1.0L / 0.0L;
728 const double y
= log(x
);
730 ATF_CHECK(isnan(y
) != 0);
735 ATF_TC_HEAD(log_inf_pos
, tc
)
737 atf_tc_set_md_var(tc
, "descr", "Test log(+Inf) == +Inf");
740 ATF_TC_BODY(log_inf_pos
, tc
)
743 const double x
= 1.0L / 0.0L;
745 ATF_CHECK(log(x
) == x
);
750 ATF_TC_HEAD(log_one_pos
, tc
)
752 atf_tc_set_md_var(tc
, "descr", "Test log(1.0) == +0.0");
755 ATF_TC_BODY(log_one_pos
, tc
)
758 const double x
= log(1.0);
759 const double y
= 0.0L;
762 ATF_CHECK(signbit(x
) == 0);
763 ATF_CHECK(signbit(y
) == 0);
767 ATF_TC(log_zero_neg
);
768 ATF_TC_HEAD(log_zero_neg
, tc
)
770 atf_tc_set_md_var(tc
, "descr", "Test log(-0.0) == -HUGE_VAL");
773 ATF_TC_BODY(log_zero_neg
, tc
)
776 const double x
= -0.0L;
778 ATF_CHECK(log(x
) == -HUGE_VAL
);
782 ATF_TC(log_zero_pos
);
783 ATF_TC_HEAD(log_zero_pos
, tc
)
785 atf_tc_set_md_var(tc
, "descr", "Test log(+0.0) == -HUGE_VAL");
788 ATF_TC_BODY(log_zero_pos
, tc
)
791 const double x
= 0.0L;
793 ATF_CHECK(log(x
) == -HUGE_VAL
);
801 ATF_TC_HEAD(logf_base
, tc
)
803 atf_tc_set_md_var(tc
, "descr", "Test logf(e) == 1");
806 ATF_TC_BODY(logf_base
, tc
)
808 const float eps
= 1.0e-7;
810 if (fabsf(logf(M_E
) - 1.0) > eps
)
811 atf_tc_fail_nonfatal("logf(e) != 1");
815 ATF_TC_HEAD(logf_nan
, tc
)
817 atf_tc_set_md_var(tc
, "descr", "Test logf(NaN) == NaN");
820 ATF_TC_BODY(logf_nan
, tc
)
823 const float x
= 0.0L / 0.0L;
825 ATF_CHECK(isnan(x
) != 0);
826 ATF_CHECK(isnan(logf(x
)) != 0);
830 ATF_TC(logf_inf_neg
);
831 ATF_TC_HEAD(logf_inf_neg
, tc
)
833 atf_tc_set_md_var(tc
, "descr", "Test logf(-Inf) == NaN");
836 ATF_TC_BODY(logf_inf_neg
, tc
)
839 const float x
= -1.0L / 0.0L;
840 const float y
= logf(x
);
842 ATF_CHECK(isnan(y
) != 0);
846 ATF_TC(logf_inf_pos
);
847 ATF_TC_HEAD(logf_inf_pos
, tc
)
849 atf_tc_set_md_var(tc
, "descr", "Test logf(+Inf) == +Inf");
852 ATF_TC_BODY(logf_inf_pos
, tc
)
855 const float x
= 1.0L / 0.0L;
857 if (strcmp(atf_config_get("atf_arch"), "alpha") == 0)
858 atf_tc_expect_fail("PR port-alpha/46301");
860 ATF_CHECK(logf(x
) == x
);
864 ATF_TC(logf_one_pos
);
865 ATF_TC_HEAD(logf_one_pos
, tc
)
867 atf_tc_set_md_var(tc
, "descr", "Test logf(1.0) == +0.0");
870 ATF_TC_BODY(logf_one_pos
, tc
)
873 const float x
= logf(1.0);
874 const float y
= 0.0L;
877 ATF_CHECK(signbit(x
) == 0);
878 ATF_CHECK(signbit(y
) == 0);
882 ATF_TC(logf_zero_neg
);
883 ATF_TC_HEAD(logf_zero_neg
, tc
)
885 atf_tc_set_md_var(tc
, "descr", "Test logf(-0.0) == -HUGE_VALF");
888 ATF_TC_BODY(logf_zero_neg
, tc
)
891 const float x
= -0.0L;
893 ATF_CHECK(logf(x
) == -HUGE_VALF
);
897 ATF_TC(logf_zero_pos
);
898 ATF_TC_HEAD(logf_zero_pos
, tc
)
900 atf_tc_set_md_var(tc
, "descr", "Test logf(+0.0) == -HUGE_VALF");
903 ATF_TC_BODY(logf_zero_pos
, tc
)
906 const float x
= 0.0L;
908 ATF_CHECK(logf(x
) == -HUGE_VALF
);
915 ATF_TP_ADD_TC(tp
, log10_base
);
916 ATF_TP_ADD_TC(tp
, log10_nan
);
917 ATF_TP_ADD_TC(tp
, log10_inf_neg
);
918 ATF_TP_ADD_TC(tp
, log10_inf_pos
);
919 ATF_TP_ADD_TC(tp
, log10_one_pos
);
920 ATF_TP_ADD_TC(tp
, log10_zero_neg
);
921 ATF_TP_ADD_TC(tp
, log10_zero_pos
);
923 ATF_TP_ADD_TC(tp
, log10f_base
);
924 ATF_TP_ADD_TC(tp
, log10f_nan
);
925 ATF_TP_ADD_TC(tp
, log10f_inf_neg
);
926 ATF_TP_ADD_TC(tp
, log10f_inf_pos
);
927 ATF_TP_ADD_TC(tp
, log10f_one_pos
);
928 ATF_TP_ADD_TC(tp
, log10f_zero_neg
);
929 ATF_TP_ADD_TC(tp
, log10f_zero_pos
);
931 ATF_TP_ADD_TC(tp
, log1p_nan
);
932 ATF_TP_ADD_TC(tp
, log1p_inf_neg
);
933 ATF_TP_ADD_TC(tp
, log1p_inf_pos
);
934 ATF_TP_ADD_TC(tp
, log1p_one_neg
);
935 ATF_TP_ADD_TC(tp
, log1p_zero_neg
);
936 ATF_TP_ADD_TC(tp
, log1p_zero_pos
);
938 ATF_TP_ADD_TC(tp
, log1pf_nan
);
939 ATF_TP_ADD_TC(tp
, log1pf_inf_neg
);
940 ATF_TP_ADD_TC(tp
, log1pf_inf_pos
);
941 ATF_TP_ADD_TC(tp
, log1pf_one_neg
);
942 ATF_TP_ADD_TC(tp
, log1pf_zero_neg
);
943 ATF_TP_ADD_TC(tp
, log1pf_zero_pos
);
945 ATF_TP_ADD_TC(tp
, log2_base
);
946 ATF_TP_ADD_TC(tp
, log2_nan
);
947 ATF_TP_ADD_TC(tp
, log2_inf_neg
);
948 ATF_TP_ADD_TC(tp
, log2_inf_pos
);
949 ATF_TP_ADD_TC(tp
, log2_one_pos
);
950 ATF_TP_ADD_TC(tp
, log2_zero_neg
);
951 ATF_TP_ADD_TC(tp
, log2_zero_pos
);
953 ATF_TP_ADD_TC(tp
, log2f_base
);
954 ATF_TP_ADD_TC(tp
, log2f_nan
);
955 ATF_TP_ADD_TC(tp
, log2f_inf_neg
);
956 ATF_TP_ADD_TC(tp
, log2f_inf_pos
);
957 ATF_TP_ADD_TC(tp
, log2f_one_pos
);
958 ATF_TP_ADD_TC(tp
, log2f_zero_neg
);
959 ATF_TP_ADD_TC(tp
, log2f_zero_pos
);
961 ATF_TP_ADD_TC(tp
, log_base
);
962 ATF_TP_ADD_TC(tp
, log_nan
);
963 ATF_TP_ADD_TC(tp
, log_inf_neg
);
964 ATF_TP_ADD_TC(tp
, log_inf_pos
);
965 ATF_TP_ADD_TC(tp
, log_one_pos
);
966 ATF_TP_ADD_TC(tp
, log_zero_neg
);
967 ATF_TP_ADD_TC(tp
, log_zero_pos
);
969 ATF_TP_ADD_TC(tp
, logf_base
);
970 ATF_TP_ADD_TC(tp
, logf_nan
);
971 ATF_TP_ADD_TC(tp
, logf_inf_neg
);
972 ATF_TP_ADD_TC(tp
, logf_inf_pos
);
973 ATF_TP_ADD_TC(tp
, logf_one_pos
);
974 ATF_TP_ADD_TC(tp
, logf_zero_neg
);
975 ATF_TP_ADD_TC(tp
, logf_zero_pos
);
977 return atf_no_error();