File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -296,4 +296,30 @@ SKIP: {
296
296
ok(signbit(copysign(NAN, -1.0)), " signbit(copysign(NAN, -1.0)))" );
297
297
}
298
298
299
+ SKIP: {
300
+ # win32 msvcrt and ucrt both have these as _j0() etc, but might
301
+ # not make them visible in the headers
302
+ $Config {d_j0 } || $^O eq " MSWin32"
303
+ or skip " No bessel functions" , 1;
304
+ # just in case j0 etc ends up being called without a prototype
305
+ is_float(j0(0.5), 0.938469807240813, " j0" );
306
+ is_float(j1(0.5), 0.242268457674874, " j1" );
307
+ is_float(jn(1, 0.5), j1(0.5), " jn" );
308
+ is_float(y0(0.5), -0.444518733506707, " y0" );
309
+ is_float(y1(0.5), -1.47147239267024, " y1" );
310
+ is_float(yn(1, 0.5), y1(0.5), " yn" );
311
+ }
312
+
313
+ sub is_float {
314
+ my ($left , $right , $note ) = @_ ;
315
+
316
+ my $ok = ok(abs($left - $right ) < 0.00001, $note );
317
+ unless ($ok ) {
318
+ diag <<EOS ;
319
+ Expected: $left
320
+ Got: $right
321
+ EOS
322
+ }
323
+ }
324
+
299
325
done_testing();
You can’t perform that action at this time.
0 commit comments