1 /* $NetBSD: t_log.c,v 1.13 2015/02/09 19:39:48 martin 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.13 2015/02/09 19:39:48 martin Exp $");
44 ATF_TC_HEAD(log10_base
, tc
)
46 atf_tc_set_md_var(tc
, "descr", "Test log10(10) == 1");
49 ATF_TC_BODY(log10_base
, tc
)
51 ATF_CHECK(log10(10.0) == 1.0);
55 ATF_TC_HEAD(log10_nan
, tc
)
57 atf_tc_set_md_var(tc
, "descr", "Test log10(NaN) == NaN");
60 ATF_TC_BODY(log10_nan
, tc
)
62 const double x
= 0.0L / 0.0L;
64 ATF_CHECK(isnan(x
) != 0);
65 ATF_CHECK(isnan(log10(x
)) != 0);
68 ATF_TC(log10_inf_neg
);
69 ATF_TC_HEAD(log10_inf_neg
, tc
)
71 atf_tc_set_md_var(tc
, "descr", "Test log10(-Inf) == NaN");
74 ATF_TC_BODY(log10_inf_neg
, tc
)
76 const double x
= -1.0L / 0.0L;
77 const double y
= log10(x
);
79 ATF_CHECK(isnan(y
) != 0);
82 ATF_TC(log10_inf_pos
);
83 ATF_TC_HEAD(log10_inf_pos
, tc
)
85 atf_tc_set_md_var(tc
, "descr", "Test log10(+Inf) == +Inf");
88 ATF_TC_BODY(log10_inf_pos
, tc
)
90 const double x
= 1.0L / 0.0L;
92 ATF_CHECK(log10(x
) == x
);
95 ATF_TC(log10_one_pos
);
96 ATF_TC_HEAD(log10_one_pos
, tc
)
98 atf_tc_set_md_var(tc
, "descr", "Test log10(1.0) == +0.0");
101 ATF_TC_BODY(log10_one_pos
, tc
)
103 const double x
= log10(1.0);
104 const double y
= 0.0L;
107 ATF_CHECK(signbit(x
) == 0);
108 ATF_CHECK(signbit(y
) == 0);
111 ATF_TC(log10_zero_neg
);
112 ATF_TC_HEAD(log10_zero_neg
, tc
)
114 atf_tc_set_md_var(tc
, "descr", "Test log10(-0.0) == -HUGE_VAL");
117 ATF_TC_BODY(log10_zero_neg
, tc
)
119 const double x
= -0.0L;
121 ATF_CHECK(log10(x
) == -HUGE_VAL
);
124 ATF_TC(log10_zero_pos
);
125 ATF_TC_HEAD(log10_zero_pos
, tc
)
127 atf_tc_set_md_var(tc
, "descr", "Test log10(+0.0) == -HUGE_VAL");
130 ATF_TC_BODY(log10_zero_pos
, tc
)
132 const double x
= 0.0L;
134 ATF_CHECK(log10(x
) == -HUGE_VAL
);
141 ATF_TC_HEAD(log10f_base
, tc
)
143 atf_tc_set_md_var(tc
, "descr", "Test log10f(10) == 1");
146 ATF_TC_BODY(log10f_base
, tc
)
148 ATF_CHECK(log10f(10.0) == 1.0);
152 ATF_TC_HEAD(log10f_nan
, tc
)
154 atf_tc_set_md_var(tc
, "descr", "Test log10f(NaN) == NaN");
157 ATF_TC_BODY(log10f_nan
, tc
)
159 const float x
= 0.0L / 0.0L;
161 ATF_CHECK(isnan(x
) != 0);
162 ATF_CHECK(isnan(log10f(x
)) != 0);
165 ATF_TC(log10f_inf_neg
);
166 ATF_TC_HEAD(log10f_inf_neg
, tc
)
168 atf_tc_set_md_var(tc
, "descr", "Test log10f(-Inf) == NaN");
171 ATF_TC_BODY(log10f_inf_neg
, tc
)
173 const float x
= -1.0L / 0.0L;
174 const float y
= log10f(x
);
176 ATF_CHECK(isnan(y
) != 0);
179 ATF_TC(log10f_inf_pos
);
180 ATF_TC_HEAD(log10f_inf_pos
, tc
)
182 atf_tc_set_md_var(tc
, "descr", "Test log10f(+Inf) == +Inf");
185 ATF_TC_BODY(log10f_inf_pos
, tc
)
187 const float x
= 1.0L / 0.0L;
189 ATF_CHECK(log10f(x
) == x
);
192 ATF_TC(log10f_one_pos
);
193 ATF_TC_HEAD(log10f_one_pos
, tc
)
195 atf_tc_set_md_var(tc
, "descr", "Test log10f(1.0) == +0.0");
198 ATF_TC_BODY(log10f_one_pos
, tc
)
200 const float x
= log10f(1.0);
201 const float y
= 0.0L;
204 ATF_CHECK(signbit(x
) == 0);
205 ATF_CHECK(signbit(y
) == 0);
208 ATF_TC(log10f_zero_neg
);
209 ATF_TC_HEAD(log10f_zero_neg
, tc
)
211 atf_tc_set_md_var(tc
, "descr", "Test log10f(-0.0) == -HUGE_VALF");
214 ATF_TC_BODY(log10f_zero_neg
, tc
)
216 const float x
= -0.0L;
218 ATF_CHECK(log10f(x
) == -HUGE_VALF
);
221 ATF_TC(log10f_zero_pos
);
222 ATF_TC_HEAD(log10f_zero_pos
, tc
)
224 atf_tc_set_md_var(tc
, "descr", "Test log10f(+0.0) == -HUGE_VALF");
227 ATF_TC_BODY(log10f_zero_pos
, tc
)
229 const float x
= 0.0L;
231 ATF_CHECK(log10f(x
) == -HUGE_VALF
);
238 ATF_TC_HEAD(log1p_nan
, tc
)
240 atf_tc_set_md_var(tc
, "descr", "Test log1p(NaN) == NaN");
243 ATF_TC_BODY(log1p_nan
, tc
)
245 const double x
= 0.0L / 0.0L;
247 ATF_CHECK(isnan(x
) != 0);
248 ATF_CHECK(isnan(log1p(x
)) != 0);
251 ATF_TC(log1p_inf_neg
);
252 ATF_TC_HEAD(log1p_inf_neg
, tc
)
254 atf_tc_set_md_var(tc
, "descr", "Test log1p(-Inf) == NaN");
257 ATF_TC_BODY(log1p_inf_neg
, tc
)
259 const double x
= -1.0L / 0.0L;
260 const double y
= log1p(x
);
263 atf_tc_expect_fail("PR lib/45362");
264 atf_tc_fail("log1p(-Inf) != NaN");
268 ATF_TC(log1p_inf_pos
);
269 ATF_TC_HEAD(log1p_inf_pos
, tc
)
271 atf_tc_set_md_var(tc
, "descr", "Test log1p(+Inf) == +Inf");
274 ATF_TC_BODY(log1p_inf_pos
, tc
)
276 const double x
= 1.0L / 0.0L;
278 ATF_CHECK(log1p(x
) == x
);
281 ATF_TC(log1p_one_neg
);
282 ATF_TC_HEAD(log1p_one_neg
, tc
)
284 atf_tc_set_md_var(tc
, "descr", "Test log1p(-1.0) == -HUGE_VAL");
287 ATF_TC_BODY(log1p_one_neg
, tc
)
289 const double x
= log1p(-1.0);
291 if (x
!= -HUGE_VAL
) {
292 atf_tc_expect_fail("PR lib/45362");
293 atf_tc_fail("log1p(-1.0) != -HUGE_VAL");
297 ATF_TC(log1p_zero_neg
);
298 ATF_TC_HEAD(log1p_zero_neg
, tc
)
300 atf_tc_set_md_var(tc
, "descr", "Test log1p(-0.0) == -0.0");
303 ATF_TC_BODY(log1p_zero_neg
, tc
)
305 const double x
= -0.0L;
307 ATF_CHECK(log1p(x
) == x
);
310 ATF_TC(log1p_zero_pos
);
311 ATF_TC_HEAD(log1p_zero_pos
, tc
)
313 atf_tc_set_md_var(tc
, "descr", "Test log1p(+0.0) == +0.0");
316 ATF_TC_BODY(log1p_zero_pos
, tc
)
318 const double x
= 0.0L;
320 ATF_CHECK(log1p(x
) == x
);
327 ATF_TC_HEAD(log1pf_nan
, tc
)
329 atf_tc_set_md_var(tc
, "descr", "Test log1pf(NaN) == NaN");
332 ATF_TC_BODY(log1pf_nan
, tc
)
334 const float x
= 0.0L / 0.0L;
336 ATF_CHECK(isnan(x
) != 0);
337 ATF_CHECK(isnan(log1pf(x
)) != 0);
340 ATF_TC(log1pf_inf_neg
);
341 ATF_TC_HEAD(log1pf_inf_neg
, tc
)
343 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-Inf) == NaN");
346 ATF_TC_BODY(log1pf_inf_neg
, tc
)
348 const float x
= -1.0L / 0.0L;
349 const float y
= log1pf(x
);
352 atf_tc_expect_fail("PR lib/45362");
353 atf_tc_fail("log1pf(-Inf) != NaN");
357 ATF_TC(log1pf_inf_pos
);
358 ATF_TC_HEAD(log1pf_inf_pos
, tc
)
360 atf_tc_set_md_var(tc
, "descr", "Test log1pf(+Inf) == +Inf");
363 ATF_TC_BODY(log1pf_inf_pos
, tc
)
365 const float x
= 1.0L / 0.0L;
367 ATF_CHECK(log1pf(x
) == x
);
370 ATF_TC(log1pf_one_neg
);
371 ATF_TC_HEAD(log1pf_one_neg
, tc
)
373 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-1.0) == -HUGE_VALF");
376 ATF_TC_BODY(log1pf_one_neg
, tc
)
378 const float x
= log1pf(-1.0);
380 if (x
!= -HUGE_VALF
) {
381 atf_tc_expect_fail("PR lib/45362");
382 atf_tc_fail("log1pf(-1.0) != -HUGE_VALF");
386 ATF_TC(log1pf_zero_neg
);
387 ATF_TC_HEAD(log1pf_zero_neg
, tc
)
389 atf_tc_set_md_var(tc
, "descr", "Test log1pf(-0.0) == -0.0");
392 ATF_TC_BODY(log1pf_zero_neg
, tc
)
394 const float x
= -0.0L;
396 ATF_CHECK(log1pf(x
) == x
);
399 ATF_TC(log1pf_zero_pos
);
400 ATF_TC_HEAD(log1pf_zero_pos
, tc
)
402 atf_tc_set_md_var(tc
, "descr", "Test log1pf(+0.0) == +0.0");
405 ATF_TC_BODY(log1pf_zero_pos
, tc
)
407 const float x
= 0.0L;
409 ATF_CHECK(log1pf(x
) == x
);
416 ATF_TC_HEAD(log2_base
, tc
)
418 atf_tc_set_md_var(tc
, "descr", "Test log2(2) == 1");
421 ATF_TC_BODY(log2_base
, tc
)
423 ATF_CHECK(log2(2.0) == 1.0);
427 ATF_TC_HEAD(log2_nan
, tc
)
429 atf_tc_set_md_var(tc
, "descr", "Test log2(NaN) == NaN");
432 ATF_TC_BODY(log2_nan
, tc
)
434 const double x
= 0.0L / 0.0L;
436 ATF_CHECK(isnan(x
) != 0);
437 ATF_CHECK(isnan(log2(x
)) != 0);
440 ATF_TC(log2_inf_neg
);
441 ATF_TC_HEAD(log2_inf_neg
, tc
)
443 atf_tc_set_md_var(tc
, "descr", "Test log2(-Inf) == NaN");
446 ATF_TC_BODY(log2_inf_neg
, tc
)
448 const double x
= -1.0L / 0.0L;
449 const double y
= log2(x
);
451 ATF_CHECK(isnan(y
) != 0);
454 ATF_TC(log2_inf_pos
);
455 ATF_TC_HEAD(log2_inf_pos
, tc
)
457 atf_tc_set_md_var(tc
, "descr", "Test log2(+Inf) == +Inf");
460 ATF_TC_BODY(log2_inf_pos
, tc
)
462 const double x
= 1.0L / 0.0L;
464 ATF_CHECK(log2(x
) == x
);
467 ATF_TC(log2_one_pos
);
468 ATF_TC_HEAD(log2_one_pos
, tc
)
470 atf_tc_set_md_var(tc
, "descr", "Test log2(1.0) == +0.0");
473 ATF_TC_BODY(log2_one_pos
, tc
)
475 const double x
= log2(1.0);
476 const double y
= 0.0L;
479 ATF_CHECK(signbit(x
) == 0);
480 ATF_CHECK(signbit(y
) == 0);
483 ATF_TC(log2_zero_neg
);
484 ATF_TC_HEAD(log2_zero_neg
, tc
)
486 atf_tc_set_md_var(tc
, "descr", "Test log2(-0.0) == -HUGE_VAL");
489 ATF_TC_BODY(log2_zero_neg
, tc
)
491 const double x
= -0.0L;
493 ATF_CHECK(log2(x
) == -HUGE_VAL
);
496 ATF_TC(log2_zero_pos
);
497 ATF_TC_HEAD(log2_zero_pos
, tc
)
499 atf_tc_set_md_var(tc
, "descr", "Test log2(+0.0) == -HUGE_VAL");
502 ATF_TC_BODY(log2_zero_pos
, tc
)
504 const double x
= 0.0L;
506 ATF_CHECK(log2(x
) == -HUGE_VAL
);
513 ATF_TC_HEAD(log2f_base
, tc
)
515 atf_tc_set_md_var(tc
, "descr", "Test log2f(2) == 1");
518 ATF_TC_BODY(log2f_base
, tc
)
520 ATF_CHECK(log2f(2.0) == 1.0);
524 ATF_TC_HEAD(log2f_nan
, tc
)
526 atf_tc_set_md_var(tc
, "descr", "Test log2f(NaN) == NaN");
529 ATF_TC_BODY(log2f_nan
, tc
)
531 const float x
= 0.0L / 0.0L;
533 ATF_CHECK(isnan(x
) != 0);
534 ATF_CHECK(isnan(log2f(x
)) != 0);
537 ATF_TC(log2f_inf_neg
);
538 ATF_TC_HEAD(log2f_inf_neg
, tc
)
540 atf_tc_set_md_var(tc
, "descr", "Test log2f(-Inf) == NaN");
543 ATF_TC_BODY(log2f_inf_neg
, tc
)
545 const float x
= -1.0L / 0.0L;
546 const float y
= log2f(x
);
548 ATF_CHECK(isnan(y
) != 0);
551 ATF_TC(log2f_inf_pos
);
552 ATF_TC_HEAD(log2f_inf_pos
, tc
)
554 atf_tc_set_md_var(tc
, "descr", "Test log2f(+Inf) == +Inf");
557 ATF_TC_BODY(log2f_inf_pos
, tc
)
559 const float x
= 1.0L / 0.0L;
561 ATF_CHECK(log2f(x
) == x
);
564 ATF_TC(log2f_one_pos
);
565 ATF_TC_HEAD(log2f_one_pos
, tc
)
567 atf_tc_set_md_var(tc
, "descr", "Test log2f(1.0) == +0.0");
570 ATF_TC_BODY(log2f_one_pos
, tc
)
572 const float x
= log2f(1.0);
573 const float y
= 0.0L;
576 ATF_CHECK(signbit(x
) == 0);
577 ATF_CHECK(signbit(y
) == 0);
580 ATF_TC(log2f_zero_neg
);
581 ATF_TC_HEAD(log2f_zero_neg
, tc
)
583 atf_tc_set_md_var(tc
, "descr", "Test log2f(-0.0) == -HUGE_VALF");
586 ATF_TC_BODY(log2f_zero_neg
, tc
)
588 const float x
= -0.0L;
590 ATF_CHECK(log2f(x
) == -HUGE_VALF
);
593 ATF_TC(log2f_zero_pos
);
594 ATF_TC_HEAD(log2f_zero_pos
, tc
)
596 atf_tc_set_md_var(tc
, "descr", "Test log2f(+0.0) == -HUGE_VALF");
599 ATF_TC_BODY(log2f_zero_pos
, tc
)
601 const float x
= 0.0L;
603 ATF_CHECK(log2f(x
) == -HUGE_VALF
);
610 ATF_TC_HEAD(log_base
, tc
)
612 atf_tc_set_md_var(tc
, "descr", "Test log(e) == 1");
615 ATF_TC_BODY(log_base
, tc
)
617 const double eps
= 1.0e-38;
619 if (fabs(log(M_E
) - 1.0) > eps
)
620 atf_tc_fail_nonfatal("log(e) != 1");
624 ATF_TC_HEAD(log_nan
, tc
)
626 atf_tc_set_md_var(tc
, "descr", "Test log(NaN) == NaN");
629 ATF_TC_BODY(log_nan
, tc
)
631 const double x
= 0.0L / 0.0L;
633 ATF_CHECK(isnan(x
) != 0);
634 ATF_CHECK(isnan(log(x
)) != 0);
638 ATF_TC_HEAD(log_inf_neg
, tc
)
640 atf_tc_set_md_var(tc
, "descr", "Test log(-Inf) == NaN");
643 ATF_TC_BODY(log_inf_neg
, tc
)
645 const double x
= -1.0L / 0.0L;
646 const double y
= log(x
);
648 ATF_CHECK(isnan(y
) != 0);
652 ATF_TC_HEAD(log_inf_pos
, tc
)
654 atf_tc_set_md_var(tc
, "descr", "Test log(+Inf) == +Inf");
657 ATF_TC_BODY(log_inf_pos
, tc
)
659 const double x
= 1.0L / 0.0L;
661 ATF_CHECK(log(x
) == x
);
665 ATF_TC_HEAD(log_one_pos
, tc
)
667 atf_tc_set_md_var(tc
, "descr", "Test log(1.0) == +0.0");
670 ATF_TC_BODY(log_one_pos
, tc
)
672 const double x
= log(1.0);
673 const double y
= 0.0L;
676 ATF_CHECK(signbit(x
) == 0);
677 ATF_CHECK(signbit(y
) == 0);
680 ATF_TC(log_zero_neg
);
681 ATF_TC_HEAD(log_zero_neg
, tc
)
683 atf_tc_set_md_var(tc
, "descr", "Test log(-0.0) == -HUGE_VAL");
686 ATF_TC_BODY(log_zero_neg
, tc
)
688 const double x
= -0.0L;
690 ATF_CHECK(log(x
) == -HUGE_VAL
);
693 ATF_TC(log_zero_pos
);
694 ATF_TC_HEAD(log_zero_pos
, tc
)
696 atf_tc_set_md_var(tc
, "descr", "Test log(+0.0) == -HUGE_VAL");
699 ATF_TC_BODY(log_zero_pos
, tc
)
701 const double x
= 0.0L;
703 ATF_CHECK(log(x
) == -HUGE_VAL
);
710 ATF_TC_HEAD(logf_base
, tc
)
712 atf_tc_set_md_var(tc
, "descr", "Test logf(e) == 1");
715 ATF_TC_BODY(logf_base
, tc
)
717 const float eps
= 1.0e-7;
719 if (fabsf(logf(M_E
) - 1.0f
) > eps
)
720 atf_tc_fail_nonfatal("logf(e) != 1");
724 ATF_TC_HEAD(logf_nan
, tc
)
726 atf_tc_set_md_var(tc
, "descr", "Test logf(NaN) == NaN");
729 ATF_TC_BODY(logf_nan
, tc
)
731 const float x
= 0.0L / 0.0L;
733 ATF_CHECK(isnan(x
) != 0);
734 ATF_CHECK(isnan(logf(x
)) != 0);
737 ATF_TC(logf_inf_neg
);
738 ATF_TC_HEAD(logf_inf_neg
, tc
)
740 atf_tc_set_md_var(tc
, "descr", "Test logf(-Inf) == NaN");
743 ATF_TC_BODY(logf_inf_neg
, tc
)
745 const float x
= -1.0L / 0.0L;
746 const float y
= logf(x
);
748 ATF_CHECK(isnan(y
) != 0);
751 ATF_TC(logf_inf_pos
);
752 ATF_TC_HEAD(logf_inf_pos
, tc
)
754 atf_tc_set_md_var(tc
, "descr", "Test logf(+Inf) == +Inf");
757 ATF_TC_BODY(logf_inf_pos
, tc
)
759 const float x
= 1.0L / 0.0L;
761 ATF_CHECK(logf(x
) == x
);
764 ATF_TC(logf_one_pos
);
765 ATF_TC_HEAD(logf_one_pos
, tc
)
767 atf_tc_set_md_var(tc
, "descr", "Test logf(1.0) == +0.0");
770 ATF_TC_BODY(logf_one_pos
, tc
)
772 const float x
= logf(1.0);
773 const float y
= 0.0L;
776 ATF_CHECK(signbit(x
) == 0);
777 ATF_CHECK(signbit(y
) == 0);
780 ATF_TC(logf_zero_neg
);
781 ATF_TC_HEAD(logf_zero_neg
, tc
)
783 atf_tc_set_md_var(tc
, "descr", "Test logf(-0.0) == -HUGE_VALF");
786 ATF_TC_BODY(logf_zero_neg
, tc
)
788 const float x
= -0.0L;
790 ATF_CHECK(logf(x
) == -HUGE_VALF
);
793 ATF_TC(logf_zero_pos
);
794 ATF_TC_HEAD(logf_zero_pos
, tc
)
796 atf_tc_set_md_var(tc
, "descr", "Test logf(+0.0) == -HUGE_VALF");
799 ATF_TC_BODY(logf_zero_pos
, tc
)
801 const float x
= 0.0L;
803 ATF_CHECK(logf(x
) == -HUGE_VALF
);
809 ATF_TP_ADD_TC(tp
, log10_base
);
810 ATF_TP_ADD_TC(tp
, log10_nan
);
811 ATF_TP_ADD_TC(tp
, log10_inf_neg
);
812 ATF_TP_ADD_TC(tp
, log10_inf_pos
);
813 ATF_TP_ADD_TC(tp
, log10_one_pos
);
814 ATF_TP_ADD_TC(tp
, log10_zero_neg
);
815 ATF_TP_ADD_TC(tp
, log10_zero_pos
);
817 ATF_TP_ADD_TC(tp
, log10f_base
);
818 ATF_TP_ADD_TC(tp
, log10f_nan
);
819 ATF_TP_ADD_TC(tp
, log10f_inf_neg
);
820 ATF_TP_ADD_TC(tp
, log10f_inf_pos
);
821 ATF_TP_ADD_TC(tp
, log10f_one_pos
);
822 ATF_TP_ADD_TC(tp
, log10f_zero_neg
);
823 ATF_TP_ADD_TC(tp
, log10f_zero_pos
);
825 ATF_TP_ADD_TC(tp
, log1p_nan
);
826 ATF_TP_ADD_TC(tp
, log1p_inf_neg
);
827 ATF_TP_ADD_TC(tp
, log1p_inf_pos
);
828 ATF_TP_ADD_TC(tp
, log1p_one_neg
);
829 ATF_TP_ADD_TC(tp
, log1p_zero_neg
);
830 ATF_TP_ADD_TC(tp
, log1p_zero_pos
);
832 ATF_TP_ADD_TC(tp
, log1pf_nan
);
833 ATF_TP_ADD_TC(tp
, log1pf_inf_neg
);
834 ATF_TP_ADD_TC(tp
, log1pf_inf_pos
);
835 ATF_TP_ADD_TC(tp
, log1pf_one_neg
);
836 ATF_TP_ADD_TC(tp
, log1pf_zero_neg
);
837 ATF_TP_ADD_TC(tp
, log1pf_zero_pos
);
839 ATF_TP_ADD_TC(tp
, log2_base
);
840 ATF_TP_ADD_TC(tp
, log2_nan
);
841 ATF_TP_ADD_TC(tp
, log2_inf_neg
);
842 ATF_TP_ADD_TC(tp
, log2_inf_pos
);
843 ATF_TP_ADD_TC(tp
, log2_one_pos
);
844 ATF_TP_ADD_TC(tp
, log2_zero_neg
);
845 ATF_TP_ADD_TC(tp
, log2_zero_pos
);
847 ATF_TP_ADD_TC(tp
, log2f_base
);
848 ATF_TP_ADD_TC(tp
, log2f_nan
);
849 ATF_TP_ADD_TC(tp
, log2f_inf_neg
);
850 ATF_TP_ADD_TC(tp
, log2f_inf_pos
);
851 ATF_TP_ADD_TC(tp
, log2f_one_pos
);
852 ATF_TP_ADD_TC(tp
, log2f_zero_neg
);
853 ATF_TP_ADD_TC(tp
, log2f_zero_pos
);
855 ATF_TP_ADD_TC(tp
, log_base
);
856 ATF_TP_ADD_TC(tp
, log_nan
);
857 ATF_TP_ADD_TC(tp
, log_inf_neg
);
858 ATF_TP_ADD_TC(tp
, log_inf_pos
);
859 ATF_TP_ADD_TC(tp
, log_one_pos
);
860 ATF_TP_ADD_TC(tp
, log_zero_neg
);
861 ATF_TP_ADD_TC(tp
, log_zero_pos
);
863 ATF_TP_ADD_TC(tp
, logf_base
);
864 ATF_TP_ADD_TC(tp
, logf_nan
);
865 ATF_TP_ADD_TC(tp
, logf_inf_neg
);
866 ATF_TP_ADD_TC(tp
, logf_inf_pos
);
867 ATF_TP_ADD_TC(tp
, logf_one_pos
);
868 ATF_TP_ADD_TC(tp
, logf_zero_neg
);
869 ATF_TP_ADD_TC(tp
, logf_zero_pos
);
871 return atf_no_error();