asinh_basic.phpt 675 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. Test return type and value for expected input asinh()
  3. --INI--
  4. precision = 14
  5. --FILE--
  6. <?php
  7. /*
  8. * Function is implemented in ext/standard/math.c
  9. */
  10. $file_path = __DIR__;
  11. require($file_path."/allowed_rounding_error.inc");
  12. echo "asinh 0.52109530549375= ";
  13. var_dump(asinh(0.52109530549375));
  14. if (allowed_rounding_error(asinh(0.52109530549375), 0.5))
  15. {
  16. echo "Pass\n";
  17. }
  18. else {
  19. echo "Fail\n";
  20. }
  21. echo "asinh 10.01787492741= ";
  22. var_dump(asinh(10.01787492741));
  23. if (allowed_rounding_error(asinh(10.01787492741), 3.0))
  24. {
  25. echo "Pass\n";
  26. }
  27. else {
  28. echo "Fail\n";
  29. }
  30. ?>
  31. --EXPECTF--
  32. asinh 0.52109530549375= float(%f)
  33. Pass
  34. asinh 10.01787492741= float(%f)
  35. Pass