Opened 18 years ago
Closed 17 years ago
#478 closed defect (fixed)
Real 1/0 = 1/0 returns ?
Reported by: | jimarin | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Math | Version: | 1.1.5 |
Severity: | blocker | Keywords: | |
Cc: |
Description
The summary says it all I think.
As a suggestion a function to ask for whether a number is finite or not...
Real IsFinite(Real Ar_xD);
Where if Ar_xD is not +Inf, -Inf, or ? then the function returns 1. Otherwise it returns 0.
jima
Change History (7)
comment:1 Changed 18 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:3 Changed 18 years ago by
in the mean time you can use the following functions:
Real IsPosInf(Real a)
{
Real If("inf"==""<<a;1;0)
};
Real IsNegInf(Real a)
{
Real If("-inf"==""<<a;1;0)
}
comment:4 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/BooleanAlgebra/test_0005 |
---|---|
Resolution: | → remind |
Status: | assigned → closed |
Problem has been fixed in CVS. You can download it from http://www.tol-project.org/pub/bin/win/tolbase-cvstrunk-setup.exe
Rules of boolean comparissons has been extended to work with non finite and unknown values:
- Everything, even unknown value, is less or equal than infinite ( 1/0)
- Everything, even unknown value, is greater or equal than -infinite (-1/0)
- In other case a comparisson involving one or more unknow values will return unknown
A test including this bug is added to http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/BooleanAlgebra/test_0005
Solving this bug in version 1.1.5 could have collateral effects and will be discussed by Tol Development Team.
New IsFinite function will be added anyway because it can't cause any problem.
Thanks to report it
comment:5 Changed 18 years ago by
In version 1.1.5 and HEAD has been added three functions
Real IsFinite(Real x);
Real IsPosInf(Real x);
Real IsNegInf(Real x);
You can download these Tol versions from
http://www.tol-project.org/pub/bin/win/tolbase-1.1.5-setup.exe
http://www.tol-project.org/pub/bin/win/tolbase-cvstrunk-setup.exe
comment:6 Changed 17 years ago by
Resolution: | remind |
---|---|
Status: | closed → reopened |
comment:7 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Thanks to report