acosh_basic.phpt 711 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. Test return type and value for expected input acosh()
  3. --INI--
  4. precision = 14
  5. --FILE--
  6. <?php
  7. /*
  8. * proto float acosh(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 "acosh 1.1276259652064= ";
  14. var_dump(acosh(1.1276259652064));
  15. if (allowed_rounding_error(acosh(1.1276259652064), 0.5))
  16. {
  17. echo "Pass\n";
  18. }
  19. else {
  20. echo "Fail\n";
  21. }
  22. echo "acosh 10.067661995778= ";
  23. var_dump(acosh(10.067661995778));
  24. if (allowed_rounding_error(acosh(10.067661995778), 3.0))
  25. {
  26. echo "Pass\n";
  27. }
  28. else {
  29. echo "Fail\n";
  30. }
  31. ?>
  32. --EXPECTF--
  33. acosh 1.1276259652064= float(%f)
  34. Pass
  35. acosh 10.067661995778= float(%f)
  36. Pass