mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
change error printing from errnum to errsym
When printing an error, calc used to print the errnum (error number): ; 1/0 Error 10001 Calc now prints the errsym (errsym): ; 1/0 Error E_DIVBYZERO Added errsym E_LN_3 for ln(0). Added errsym E_LOG_5 for log(0). Added errsym E_LOG2_4 for log2(0). Added errsym E_LOGN_6 for logn(0,base).
This commit is contained in:
8
qtrans.c
8
qtrans.c
@@ -1057,7 +1057,7 @@ qln(NUMBER *q, NUMBER *epsilon)
|
||||
bool neg;
|
||||
|
||||
if (qiszero(q)) {
|
||||
math_error("logarithm of 0");
|
||||
math_error("ln of 0");
|
||||
not_reached();
|
||||
}
|
||||
if (qiszero(epsilon)) {
|
||||
@@ -1173,7 +1173,7 @@ qlog(NUMBER *q, NUMBER *epsilon)
|
||||
|
||||
/* firewall */
|
||||
if (qiszero(q)) {
|
||||
math_error("logarithm of 0");
|
||||
math_error("log of 0");
|
||||
not_reached();
|
||||
}
|
||||
if (qiszero(epsilon)) {
|
||||
@@ -1254,7 +1254,7 @@ qlog2(NUMBER *q, NUMBER *epsilon)
|
||||
|
||||
/* firewall */
|
||||
if (qiszero(q)) {
|
||||
math_error("logarithm of 0");
|
||||
math_error("log2 of 0");
|
||||
not_reached();
|
||||
}
|
||||
if (qiszero(epsilon)) {
|
||||
@@ -1328,7 +1328,7 @@ qlogn(NUMBER *q, NUMBER *n, NUMBER *epsilon)
|
||||
|
||||
/* firewall */
|
||||
if (qiszero(q)) {
|
||||
math_error("logarithm of 0");
|
||||
math_error("log base n of 0");
|
||||
not_reached();
|
||||
}
|
||||
if (qiszero(epsilon)) {
|
||||
|
Reference in New Issue
Block a user