| 1 |
# frama-c -wp [...] |
| 2 |
[kernel] Parsing float_const.i (no preprocessing) |
| 3 |
[kernel:parser:decimal-float] float_const.i:10: Warning: |
| 4 |
Floating-point constant 0.1f is not represented exactly. Will use 0x1.99999a0000000p-4. |
| 5 |
[kernel:parser:decimal-float] float_const.i:19: Warning: |
| 6 |
Floating-point constant 0.1 is not represented exactly. Will use 0x1.999999999999ap-4. |
| 7 |
[wp] Running WP plugin... |
| 8 |
[wp] Warning: Missing RTE guards |
| 9 |
[wp] 8 goals scheduled |
| 10 |
[wp:print-generated] |
| 11 |
theory WP |
| 12 |
(* use why3.BuiltIn.BuiltIn *) |
| 13 |
|
| 14 |
(* use bool.Bool *) |
| 15 |
|
| 16 |
(* use int.Int *) |
| 17 |
|
| 18 |
(* use int.ComputerDivision *) |
| 19 |
|
| 20 |
(* use real.RealInfix *) |
| 21 |
|
| 22 |
(* use frama_c_wp.qed.Qed *) |
| 23 |
|
| 24 |
(* use map.Map *) |
| 25 |
|
| 26 |
(* use real.Abs *) |
| 27 |
|
| 28 |
(* use frama_c_wp.cmath.Cmath *) |
| 29 |
|
| 30 |
(* use real.Square *) |
| 31 |
|
| 32 |
(* use frama_c_wp.cmath.Square1 *) |
| 33 |
|
| 34 |
(* use frama_c_wp.cfloat.Cfloat *) |
| 35 |
|
| 36 |
goal wp_goal : |
| 37 |
forall f:t. |
| 38 |
let r = of_f32 f in |
| 39 |
eq_f32 f (0x1.99999Ap-4:t) -> of_f32 (to_f32 (of_f64 (to_f64 r))) = r |
| 40 |
end |
| 41 |
[wp:print-generated] |
| 42 |
theory WP1 |
| 43 |
(* use why3.BuiltIn.BuiltIn *) |
| 44 |
|
| 45 |
(* use bool.Bool *) |
| 46 |
|
| 47 |
(* use int.Int *) |
| 48 |
|
| 49 |
(* use int.ComputerDivision *) |
| 50 |
|
| 51 |
(* use real.RealInfix *) |
| 52 |
|
| 53 |
(* use frama_c_wp.qed.Qed *) |
| 54 |
|
| 55 |
(* use map.Map *) |
| 56 |
|
| 57 |
(* use real.Abs *) |
| 58 |
|
| 59 |
(* use frama_c_wp.cmath.Cmath *) |
| 60 |
|
| 61 |
(* use real.Square *) |
| 62 |
|
| 63 |
(* use frama_c_wp.cmath.Square1 *) |
| 64 |
|
| 65 |
(* use frama_c_wp.cfloat.Cfloat *) |
| 66 |
|
| 67 |
goal wp_goal : |
| 68 |
forall f:t. |
| 69 |
eq_f32 f (0x1.99999Ap-4:t) -> |
| 70 |
not of_f32 f = (3602879701896397.0 / 36028797018963968.0) |
| 71 |
end |
| 72 |
[wp:print-generated] |
| 73 |
theory WP2 |
| 74 |
(* use why3.BuiltIn.BuiltIn *) |
| 75 |
|
| 76 |
(* use bool.Bool *) |
| 77 |
|
| 78 |
(* use int.Int *) |
| 79 |
|
| 80 |
(* use int.ComputerDivision *) |
| 81 |
|
| 82 |
(* use real.RealInfix *) |
| 83 |
|
| 84 |
(* use frama_c_wp.qed.Qed *) |
| 85 |
|
| 86 |
(* use map.Map *) |
| 87 |
|
| 88 |
(* use real.Abs *) |
| 89 |
|
| 90 |
(* use frama_c_wp.cmath.Cmath *) |
| 91 |
|
| 92 |
(* use real.Square *) |
| 93 |
|
| 94 |
(* use frama_c_wp.cmath.Square1 *) |
| 95 |
|
| 96 |
(* use frama_c_wp.cfloat.Cfloat *) |
| 97 |
|
| 98 |
goal wp_goal : |
| 99 |
forall f:t. |
| 100 |
eq_f32 f (0x1.99999Ap-4:t) -> of_f32 f = (13421773.0 / 134217728.0) |
| 101 |
end |
| 102 |
[wp:print-generated] |
| 103 |
theory WP3 |
| 104 |
(* use why3.BuiltIn.BuiltIn *) |
| 105 |
|
| 106 |
(* use bool.Bool *) |
| 107 |
|
| 108 |
(* use int.Int *) |
| 109 |
|
| 110 |
(* use int.ComputerDivision *) |
| 111 |
|
| 112 |
(* use real.RealInfix *) |
| 113 |
|
| 114 |
(* use frama_c_wp.qed.Qed *) |
| 115 |
|
| 116 |
(* use map.Map *) |
| 117 |
|
| 118 |
(* use real.Abs *) |
| 119 |
|
| 120 |
(* use frama_c_wp.cmath.Cmath *) |
| 121 |
|
| 122 |
(* use real.Square *) |
| 123 |
|
| 124 |
(* use frama_c_wp.cmath.Square1 *) |
| 125 |
|
| 126 |
(* use frama_c_wp.cfloat.Cfloat *) |
| 127 |
|
| 128 |
goal wp_goal : |
| 129 |
forall f:t. eq_f32 f (0x1.99999Ap-4:t) -> not of_f32 f = (1.0 / 10.0) |
| 130 |
end |
| 131 |
[wp:print-generated] |
| 132 |
theory WP4 |
| 133 |
(* use why3.BuiltIn.BuiltIn *) |
| 134 |
|
| 135 |
(* use bool.Bool1 *) |
| 136 |
|
| 137 |
(* use int.Int1 *) |
| 138 |
|
| 139 |
(* use int.ComputerDivision1 *) |
| 140 |
|
| 141 |
(* use real.RealInfix1 *) |
| 142 |
|
| 143 |
(* use frama_c_wp.qed.Qed1 *) |
| 144 |
|
| 145 |
(* use map.Map1 *) |
| 146 |
|
| 147 |
(* use real.Abs1 *) |
| 148 |
|
| 149 |
(* use frama_c_wp.cmath.Cmath1 *) |
| 150 |
|
| 151 |
(* use real.Square2 *) |
| 152 |
|
| 153 |
(* use frama_c_wp.cmath.Square3 *) |
| 154 |
|
| 155 |
(* use frama_c_wp.cfloat.Cfloat1 *) |
| 156 |
|
| 157 |
goal wp_goal : |
| 158 |
forall f:t1. |
| 159 |
let r = of_f321 (to_f321 (of_f641 f)) in |
| 160 |
eq_f64 f (0x1.999999999999Ap-4:t1) -> of_f641 (to_f641 r) = r |
| 161 |
end |
| 162 |
[wp:print-generated] |
| 163 |
theory WP5 |
| 164 |
(* use why3.BuiltIn.BuiltIn *) |
| 165 |
|
| 166 |
(* use bool.Bool1 *) |
| 167 |
|
| 168 |
(* use int.Int1 *) |
| 169 |
|
| 170 |
(* use int.ComputerDivision1 *) |
| 171 |
|
| 172 |
(* use real.RealInfix1 *) |
| 173 |
|
| 174 |
(* use frama_c_wp.qed.Qed1 *) |
| 175 |
|
| 176 |
(* use map.Map1 *) |
| 177 |
|
| 178 |
(* use real.Abs1 *) |
| 179 |
|
| 180 |
(* use frama_c_wp.cmath.Cmath1 *) |
| 181 |
|
| 182 |
(* use real.Square2 *) |
| 183 |
|
| 184 |
(* use frama_c_wp.cmath.Square3 *) |
| 185 |
|
| 186 |
(* use frama_c_wp.cfloat.Cfloat1 *) |
| 187 |
|
| 188 |
goal wp_goal : |
| 189 |
forall f:t1. |
| 190 |
eq_f64 f (0x1.999999999999Ap-4:t1) -> |
| 191 |
not of_f641 f = (13421773.0 /' 134217728.0) |
| 192 |
end |
| 193 |
[wp:print-generated] |
| 194 |
theory WP6 |
| 195 |
(* use why3.BuiltIn.BuiltIn *) |
| 196 |
|
| 197 |
(* use bool.Bool1 *) |
| 198 |
|
| 199 |
(* use int.Int1 *) |
| 200 |
|
| 201 |
(* use int.ComputerDivision1 *) |
| 202 |
|
| 203 |
(* use real.RealInfix1 *) |
| 204 |
|
| 205 |
(* use frama_c_wp.qed.Qed1 *) |
| 206 |
|
| 207 |
(* use map.Map1 *) |
| 208 |
|
| 209 |
(* use real.Abs1 *) |
| 210 |
|
| 211 |
(* use frama_c_wp.cmath.Cmath1 *) |
| 212 |
|
| 213 |
(* use real.Square2 *) |
| 214 |
|
| 215 |
(* use frama_c_wp.cmath.Square3 *) |
| 216 |
|
| 217 |
(* use frama_c_wp.cfloat.Cfloat1 *) |
| 218 |
|
| 219 |
goal wp_goal : |
| 220 |
forall f:t1. |
| 221 |
eq_f64 f (0x1.999999999999Ap-4:t1) -> |
| 222 |
of_f641 f = (3602879701896397.0 /' 36028797018963968.0) |
| 223 |
end |
| 224 |
[wp:print-generated] |
| 225 |
theory WP7 |
| 226 |
(* use why3.BuiltIn.BuiltIn *) |
| 227 |
|
| 228 |
(* use bool.Bool1 *) |
| 229 |
|
| 230 |
(* use int.Int1 *) |
| 231 |
|
| 232 |
(* use int.ComputerDivision1 *) |
| 233 |
|
| 234 |
(* use real.RealInfix1 *) |
| 235 |
|
| 236 |
(* use frama_c_wp.qed.Qed1 *) |
| 237 |
|
| 238 |
(* use map.Map1 *) |
| 239 |
|
| 240 |
(* use real.Abs1 *) |
| 241 |
|
| 242 |
(* use frama_c_wp.cmath.Cmath1 *) |
| 243 |
|
| 244 |
(* use real.Square2 *) |
| 245 |
|
| 246 |
(* use frama_c_wp.cmath.Square3 *) |
| 247 |
|
| 248 |
(* use frama_c_wp.cfloat.Cfloat1 *) |
| 249 |
|
| 250 |
goal wp_goal : |
| 251 |
forall f:t1. |
| 252 |
eq_f64 f (0x1.999999999999Ap-4:t1) -> not of_f641 f = (1.0 /' 10.0) |
| 253 |
end |
| 254 |
[wp] 8 goals generated |
| 255 |
------------------------------------------------------------ |
| 256 |
Function double_convertible |
| 257 |
------------------------------------------------------------ |
| 258 |
|
| 259 |
Goal Check (file float_const.i, line 20): |
| 260 |
Assume { |
| 261 |
(* Then *) |
| 262 |
Have: eq_f64(d, to_f64((3602879701896397.0/36028797018963968))). |
| 263 |
} |
| 264 |
Prove: of_f64(d) != (1.0/10). |
| 265 |
|
| 266 |
------------------------------------------------------------ |
| 267 |
|
| 268 |
Goal Check (file float_const.i, line 21): |
| 269 |
Assume { |
| 270 |
(* Then *) |
| 271 |
Have: eq_f64(d, to_f64((3602879701896397.0/36028797018963968))). |
| 272 |
} |
| 273 |
Prove: of_f64(d) = (3602879701896397.0/36028797018963968). |
| 274 |
|
| 275 |
------------------------------------------------------------ |
| 276 |
|
| 277 |
Goal Check (file float_const.i, line 22): |
| 278 |
Assume { |
| 279 |
(* Then *) |
| 280 |
Have: eq_f64(d, to_f64((3602879701896397.0/36028797018963968))). |
| 281 |
} |
| 282 |
Prove: of_f64(d) != (13421773.0/134217728). |
| 283 |
|
| 284 |
------------------------------------------------------------ |
| 285 |
|
| 286 |
Goal Check (file float_const.i, line 23): |
| 287 |
Let r = of_f32(to_f32(of_f64(d))). |
| 288 |
Assume { |
| 289 |
(* Then *) |
| 290 |
Have: eq_f64(d, to_f64((3602879701896397.0/36028797018963968))). |
| 291 |
} |
| 292 |
Prove: of_f64(to_f64(r)) = r. |
| 293 |
|
| 294 |
------------------------------------------------------------ |
| 295 |
------------------------------------------------------------ |
| 296 |
Function float_convertible |
| 297 |
------------------------------------------------------------ |
| 298 |
|
| 299 |
Goal Check (file float_const.i, line 11): |
| 300 |
Assume { (* Then *) Have: eq_f32(f, to_f32((13421773.0/134217728))). } |
| 301 |
Prove: of_f32(f) != (1.0/10). |
| 302 |
|
| 303 |
------------------------------------------------------------ |
| 304 |
|
| 305 |
Goal Check (file float_const.i, line 12): |
| 306 |
Assume { (* Then *) Have: eq_f32(f, to_f32((13421773.0/134217728))). } |
| 307 |
Prove: of_f32(f) = (13421773.0/134217728). |
| 308 |
|
| 309 |
------------------------------------------------------------ |
| 310 |
|
| 311 |
Goal Check (file float_const.i, line 13): |
| 312 |
Assume { (* Then *) Have: eq_f32(f, to_f32((13421773.0/134217728))). } |
| 313 |
Prove: of_f32(f) != (3602879701896397.0/36028797018963968). |
| 314 |
|
| 315 |
------------------------------------------------------------ |
| 316 |
|
| 317 |
Goal Check (file float_const.i, line 14): |
| 318 |
Let r = of_f32(f). |
| 319 |
Assume { (* Then *) Have: eq_f32(f, to_f32((13421773.0/134217728))). } |
| 320 |
Prove: of_f32(to_f32(of_f64(to_f64(r)))) = r. |
| 321 |
|
| 322 |
------------------------------------------------------------ |