File tree 3 files changed +4274
-114
lines changed
3 files changed +4274
-114
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ pub struct TestCase<Op: MathOp> {
18
18
}
19
19
20
20
impl < Op : MathOp > TestCase < Op > {
21
- #[ expect( dead_code) ]
22
21
fn append_inputs ( v : & mut Vec < Self > , l : & [ Op :: RustArgs ] ) {
23
22
v. extend ( l. iter ( ) . copied ( ) . map ( |input| Self {
24
23
input,
@@ -532,7 +531,17 @@ fn lgammaf_r_cases() -> Vec<TestCase<op::lgammaf_r::Routine>> {
532
531
}
533
532
534
533
fn log_cases ( ) -> Vec < TestCase < op:: log:: Routine > > {
535
- vec ! [ ]
534
+ let mut v = Vec :: new ( ) ;
535
+ TestCase :: append_inputs (
536
+ & mut v,
537
+ & [
538
+ // Cases that showed up during extensive tests and proved problematic
539
+ ( hf64 ! ( "0x1.ffffffffffff9p-1" ) , ) ,
540
+ ( hf64 ! ( "0x1.4b649a5ce2720p-235" ) , ) ,
541
+ ( hf64 ! ( "0x1.b028b028b02a0p-1" ) , ) ,
542
+ ] ,
543
+ ) ;
544
+ v
536
545
}
537
546
538
547
fn log10_cases ( ) -> Vec < TestCase < op:: log10:: Routine > > {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
48
48
49
49
// Operations that aren't required to be exact, but our implementations are.
50
50
Bn :: Cbrt => 0 ,
51
+ Bn :: Log if ctx. fn_ident == Id :: Log => 0 ,
51
52
52
53
// Bessel functions have large inaccuracies.
53
54
Bn :: J0 | Bn :: J1 | Bn :: Y0 | Bn :: Y1 | Bn :: Jn | Bn :: Yn => 8_000_000 ,
@@ -98,6 +99,7 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 {
98
99
99
100
match ctx. fn_ident {
100
101
Id :: Cbrt => ulp = 2 ,
102
+ Id :: Log => ulp = 2 ,
101
103
// FIXME(#401): musl has an incorrect result here.
102
104
Id :: Fdim => ulp = 2 ,
103
105
Id :: Sincosf => ulp = 500 ,
You can’t perform that action at this time.
0 commit comments