From 0e002f8ca0d569ae083ed250aee78919d2f9c672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 18 Jun 2015 00:19:23 +0100 Subject: [PATCH] improve error messages --- C/arith1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/C/arith1.c b/C/arith1.c index 1519bf63f..3c969e92b 100644 --- a/C/arith1.c +++ b/C/arith1.c @@ -459,7 +459,7 @@ eval1(Int fi, Term t USES_REGS) { if (dbl >= 0) { RFLOAT(log10(dbl)); } else { - return Yap_ArithError(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, t, "log(%f)", dbl); + return Yap_ArithError(DOMAIN_ERROR_NOT_LESS_THAN_ZERO, t, "log10(%f)", dbl); } } case op_sqrt: @@ -468,7 +468,7 @@ eval1(Int fi, Term t USES_REGS) { out = sqrt(dbl); #if HAVE_ISNAN if (isnan(out)) { - return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "acos(%f)", dbl); + return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "sqrt(%f)", dbl); } #endif RFLOAT(out); @@ -543,7 +543,7 @@ eval1(Int fi, Term t USES_REGS) { out = atan(dbl); #if HAVE_ISNAN if (isnan(out)) { - return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "atanh(%f)", dbl); + return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "atan(%f)", dbl); } #endif RFLOAT(out); @@ -556,7 +556,7 @@ eval1(Int fi, Term t USES_REGS) { out = asinh(dbl); #if HAVE_ISNAN if (isnan(out)) { - return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "atanh(%f)", dbl); + return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "asinh(%f)", dbl); } #endif RFLOAT(out); @@ -569,7 +569,7 @@ eval1(Int fi, Term t USES_REGS) { out = acosh(dbl); #if HAVE_ISNAN if (isnan(out)) { - return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "atanh(%f)", dbl); + return Yap_ArithError(DOMAIN_ERROR_OUT_OF_RANGE, t, "acosh(%f)", dbl); } #endif RFLOAT(out);