Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
9008e804
Commit
9008e804
authored
Feb 09, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup.
parent
d90ef335
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
simmod/ass1/floating_point.c
simmod/ass1/floating_point.c
+1
-15
No files found.
simmod/ass1/floating_point.c
View file @
9008e804
...
@@ -9,21 +9,7 @@ int main(void) {
...
@@ -9,21 +9,7 @@ int main(void) {
PRINT_SIZE
(
double
);
PRINT_SIZE
(
double
);
PRINT_SIZE
(
long
double
);
PRINT_SIZE
(
long
double
);
/*
float
e
=
1
.
f
;
// Will be replaced in assembly
* C = 0.f; op = '+'; e = 1.4012984643248171e-45
* C = 0.f; op = '-'; e = 1.4012984643248171e-45
* C = 1.f; op = '+'; e = 1.0842021724855044e-19
* C = 1.f; op = '-'; e = 5.4210108624275222e-20
* C = -1.f; op = '+'; e = 5.4210108624275222e-20
* C = -1.f; op = '-'; e = 1.0842021724855044e-19
*/
//float e, old;
//for(e = 1.f; 1.f - e != 1.f; old = e, e /= 2);
//printf("epsilon: %e\n", old);
//printf("epsilon: %.80f\n", old);
// 0.1f = 0x3dcccccd = '0 01111011 10011001100110011001101'
float
e
=
1
.
f
;
printf
(
"our epsilon: %.12e
\n
"
,
e
);
printf
(
"our epsilon: %.12e
\n
"
,
e
);
printf
(
"f range: [%e, %e]
\n
"
,
FLT_MIN
,
FLT_MAX
);
printf
(
"f range: [%e, %e]
\n
"
,
FLT_MIN
,
FLT_MAX
);
printf
(
"d range: [%e, %e]
\n
"
,
DBL_MIN
,
DBL_MAX
);
printf
(
"d range: [%e, %e]
\n
"
,
DBL_MIN
,
DBL_MAX
);
...
...
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