Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Requesting message text improvement.
Since below code makes werid warning message.
SELECT sum(LOG(GREATEST(1 + -2270.053/100, 1e-10)));
SHOW WARNINGS;
"Level;Code;Message
Warning;1365;Division by 0"
Literally, meaning is correct, nothing wrong,
but with huge quries, cannot find the division 0 issue by searching '/' or somthing
since the log logic internally do division like below code sample.
So, make the message "Division by 0 in the Log function or something" to make db developer's life easier.
double my_log(double x) { |
if (x <= 0) return NAN; |
 |
double y = x - 1; |
for (int i = 0; i < 50; i++) { |
double exp_y = exp(y); |
y = y - (exp_y - x) / exp_y; <<<---- HERE
|
}
|
return y; |