Merge branch 'smtv2-dont-fail-on-untyped-prover-vars' into 'master'
[why3.git] / tests / my_cosine.c
blob4cf7292c81928437d87281d862d6af4822bfa588
1 /*@ lemma method_error: \forall real x;
2 @ \abs(x) <= 0x1p-5 ==> \abs(1.0 - x*x*0.5 - \cos(x)) <= 0x1p-24;
3 @*/
5 /*@ requires \abs(x) <= 0x1p-5;
6 @ ensures \abs(\result - \cos(x)) <= 0x1p-23;
7 @*/
8 float my_cos1(float x) {
9 //@ assert \abs(1.0 - x*x*0.5 - \cos(x)) <= 0x1p-24;
10 return 1.0f - x * x * 0.5f;