File tree Expand file tree Collapse file tree 3 files changed +4274
-114
lines changed Expand file tree Collapse file tree 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> {
1818}
1919
2020impl < Op : MathOp > TestCase < Op > {
21- #[ expect( dead_code) ]
2221 fn append_inputs ( v : & mut Vec < Self > , l : & [ Op :: RustArgs ] ) {
2322 v. extend ( l. iter ( ) . copied ( ) . map ( |input| Self {
2423 input,
@@ -532,7 +531,17 @@ fn lgammaf_r_cases() -> Vec<TestCase<op::lgammaf_r::Routine>> {
532531}
533532
534533fn 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
536545}
537546
538547fn 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 {
4848
4949 // Operations that aren't required to be exact, but our implementations are.
5050 Bn :: Cbrt => 0 ,
51+ Bn :: Log if ctx. fn_ident == Id :: Log => 0 ,
5152
5253 // Bessel functions have large inaccuracies.
5354 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 {
9899
99100 match ctx. fn_ident {
100101 Id :: Cbrt => ulp = 2 ,
102+ Id :: Log => ulp = 2 ,
101103 // FIXME(#401): musl has an incorrect result here.
102104 Id :: Fdim => ulp = 2 ,
103105 Id :: Sincosf => ulp = 500 ,
You can’t perform that action at this time.
0 commit comments