Skip to content

Commit

Permalink
Add fabs again
Browse files Browse the repository at this point in the history
  • Loading branch information
sakehl committed May 6, 2024
1 parent 8b621c8 commit e438c7b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions res/universal/res/c/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
pure double M_PI() = 3.14159265358979323846;
@*/

/*@
ensures \result == (x >= 0 ? x : -x);
decreases;
@*/
float /*@ pure @*/ fabsf(float x);

/*@
requires x>= 0;
ensures \result == \pow(x, 0.5);
Expand Down Expand Up @@ -118,6 +124,12 @@ float /*@ pure @*/ ceilf(float x);
@*/
float /*@ pure @*/ roundf(float x);

/*@
ensures \result == (x >= 0 ? x : -x);
decreases;
@*/
double /*@ pure @*/ fabs(double x);

/*@
requires x>= 0;
ensures \result == pow(x, 0.5);
Expand Down

0 comments on commit e438c7b

Please sign in to comment.