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
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
121
Issues
121
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
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
Why3
why3
Commits
1567624e
Commit
1567624e
authored
Aug 01, 2011
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new library arith.mlw: arithmetic for programs
parent
4e6f7b18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
modules/arith.mlw
modules/arith.mlw
+29
-0
No files found.
modules/arith.mlw
0 → 100644
View file @
1567624e
(* Arithmetic for programs *)
module Int
use export int.Int
use export int.ComputerDivision
let (/) (x: int) (y:int) = { y <> 0 } div x y { result = div x y }
end
(* machine arithmetic (32-bit integers, etc.) will go here *)
module Real
use import real.Real
use export real.RealInfix
use export real.FromInt
let (/.) (x: real) (y: real) = { y <> 0. } x / y { result = x / y }
end
(*
Local Variables:
compile-command: "unset LANG; make -C .. modules/arith"
End:
*)
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