预订演示
前页 后页

errors

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();
}