File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
math /
asin_variation.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test variations in usage of asin()
--INI--
precision = 10
--FILE--
<?php
/*
* proto float asin(float number)
* Function is implemented in ext/standard/math.c
*/
//Test asin with a different input values
$values = array(23,
-23,
2.345e1,
-2.345e1,
0x17,
027,
"23",
"23.45",
"2.345e1",
"nonsense",
"1000",
"1000ABC",
null,
true,
false);
for ($i = 0; $i < count($values); $i++) {
$res = asin($values[$i]);
var_dump($res);
}
?>
--EXPECTF--
float(NAN)
float(NAN)
float(NAN)
float(NAN)
float(NAN)
float(NAN)
float(NAN)
float(NAN)
float(NAN)
Warning: asin() expects parameter 1 to be double, string given in %s on line %d
NULL
float(NAN)
Notice: A non well formed numeric value encountered in %s on line %d
float(NAN)
float(0)
float(1.570796327)
float(0)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>