asinh_basic.phpt 710 B

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