Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
e4811e4c
Commit
e4811e4c
authored
6 years ago
by
Hamza Bourbouh
Browse files
Options
Downloads
Patches
Plain Diff
add more conversion libraries
parent
239f4429
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/conv.c
+7
-0
7 additions, 0 deletions
include/conv.c
include/conv.lusi
+7
-0
7 additions, 0 deletions
include/conv.lusi
with
14 additions
and
0 deletions
include/conv.c
+
7
−
0
View file @
e4811e4c
#include
<math.h>
int
real_to_int
(
double
in1
)
{
return
(
int
)
in1
;
}
int
_Floor
(
double
in1
)
{
return
(
int
)
floor
(
in1
);
}
double
_floor
(
double
in1
)
{
return
floor
(
in1
);
}
int
_Ceiling
(
double
in1
)
{
return
(
int
)
ceil
(
in1
);
}
double
_ceil
(
double
in1
)
{
return
ceil
(
in1
);
}
int
_Round
(
double
in1
)
{
return
(
int
)
round
(
in1
);
}
double
_round
(
double
in1
)
{
return
round
(
in1
);
}
double
int_to_real
(
int
in1
)
{
return
(
double
)
in1
;
}
This diff is collapsed.
Click to expand it.
include/conv.lusi
+
7
−
0
View file @
e4811e4c
function real_to_int (in1: real) returns (out: int) prototype C;
function _Floor (in1: real) returns (out: int) prototype C;
function _floor (in1: real) returns (out: real) prototype C;
function _Ceiling (in1: real) returns (out: int) prototype C;
function _ceil (in1: real) returns (out: real) prototype C;
function _Round (in1: real) returns (out: int) prototype C;
function _round (in1: real) returns (out: real) prototype C;
function int_to_real (in1: int) returns (out: real) prototype C;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment