Subject: Query: Gnome-Calculator bug 702817
- From: Elita Lobo <loboelita gmail com>
- To: gcalctool-list gnome org
- Subject: Subject: Query: Gnome-Calculator bug 702817
- Date: Sat, 1 Mar 2014 16:16:48 +0530
Respected Sir,
In number.vala file there is an if condition for overflow which if made false can enable the calculator to calculate large powers , large factorials and it also eliminates the error of overflow that occurs while calculating ln(e^x) for x>3.
As given in the comments, this if condition prevents it from crashing due to overflow but I cant find any case in which it could happen. Kindly let me know the in which case this code given below was meant to be applicable so that I can substitute it with a more efficient condition for overflow which wont affect other calculations.
CODE:
{
/* This is probably insufficient overflow detection, but it makes us not crash at least. */
if (T+3 < med)
{
mperr (_("Overflow: the result couldn't be calculated"));
return new Number.integer (0);
}
Regards,
Elita Lobo
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]