Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
StdEnv-doc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cloogle
StdEnv-doc
Commits
67706f37
Commit
67706f37
authored
Jan 09, 2019
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add macros for Infinity, NaN, isNaN, isInfinity and isFinite
parent
89cf3191
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
StdEnv 64 Changed Files/StdReal.icl
StdEnv 64 Changed Files/StdReal.icl
+7
-0
StdReal.dcl
StdReal.dcl
+7
-0
StdReal.icl
StdReal.icl
+7
-0
No files found.
StdEnv 64 Changed Files/StdReal.icl
View file @
67706f37
...
...
@@ -325,3 +325,10 @@ entier a
=
code inline {
entierR
}
Infinity
:==
1E9999
NaN
:==
1E9999
+(
-1E9999
)
isNaN
x
:==
if
(
x
==
x
)
False
True
isInfinity
x
:==
if
(
abs
x
==
1E9999
)
True
False
isFinite
x
:==
if
(
x
-
x
==
0.0
)
True
False
StdReal.dcl
View file @
67706f37
...
...
@@ -57,3 +57,10 @@ instance atanh Real // Arc Hyperbolic Tangent, partial function, only defined i
// Additional conversion:
entier
::
!
Real
->
Int
// Convert Real into Int by taking entier
Infinity
:==
1E9999
NaN
:==
1E9999
+(
-1E9999
)
isNaN
x
:==
if
(
x
==
x
)
False
True
isInfinity
x
:==
if
(
abs
x
==
1E9999
)
True
False
isFinite
x
:==
if
(
x
-
x
==
0.0
)
True
False
StdReal.icl
View file @
67706f37
...
...
@@ -325,3 +325,10 @@ entier a
=
code inline {
entierR
}
Infinity
:==
1E9999
NaN
:==
1E9999
+(
-1E9999
)
isNaN
x
:==
if
(
x
==
x
)
False
True
isInfinity
x
:==
if
(
abs
x
==
1E9999
)
True
False
isFinite
x
:==
if
(
x
-
x
==
0.0
)
True
False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment