前页 后页

错误

Printing an error message

var cephes_errors = [
"'unknown'", /* error code 0 */
"'domain'", /* error code 1 */
"'singularity'", /* et seq. */
"'overflow'",
"'underflow'",
"'total loss of precision'",
"'partial loss of precision'" ];

function printError()
{
var er = cephes.geterror();
if(er>0)
{
Session.Output( "cephes error " + err + " " + cephes_errors[er]);
}
}


Testing for error

if(cephes.inerror())
{
printError();
}