- Feb 06, 2025
-
-
The parser used to always assign the [lower], [nearest] and [upper] to the same constant for any hexadecimal float. Which is obviously wrong. It is fixed by using [float_of_string] and rounding modes to compute upper and lower bounds.
-
-
Asked as a helper function to minimize modifications and ensures backward compatibility. Will be removed when every thing relies and the typed floats, which means probably never.
-
The loops use to adjust the exponent, the numerator and the denominator can take a long time (more than 200000 iterations) for numbers with a large exponent, for instance 1e99999. This is trivially not representable as a double but the loops are too long to figure it out. Those loops are here because the actual fast and correct way to make the adjustement requires to compute a number δ using binary logarithms, and more specifically the ceiling of the difference of two binary logs. This computation cannot be done exactly, as Zarith only provides (which is absolutly normal, don't get me wrong) a rounded down approximation of the binary log of any given integer. However, it can still be used to compute an underapproximation of the exponent that will be produced by the loops. And computing this underapproximation is trivially fast. We can thus use this underapproximation to check if the number will be a positive infinite in no time, avoiding the loop and thus the DoS. An important point is that this method is correct. Proving that the proposition "δ is larger than the maximal exponent" implies that "the parsed number is infinity" is not hard and is underlined in the comments of the parsing function.
-
Plus a little fix (a Kernel.failure that became a Kernel.log)
-
- Renaming [round_to] as [change_format] to avoid confusion with [round] - Renaming [of_float] as [represents ~float ~in_format] to better convey the goal of this module and why we hide the float type - Adding [@@noalloc] to external functions [set_rounding_mode] and [get_rounding_mode] as a (rather small) optimisation
-
- Bug fix in [single_precision_of_string] - Removing unused [frama_c_sqrt] - Adding default cases to all switch to catch erronous inputs
-
-
The module now handles explicitly the floating point formats using the type system, thus ensuring strict manipulation of float numbers.
-
Maxime Jacquemin authored
Regroup all arithmetic modules in one place See merge request frama-c/frama-c!4923
-
Maxime Jacquemin authored
-
Maxime Jacquemin authored
-
Basile Desloges authored
-
Maxime Jacquemin authored
-
Maxime Jacquemin authored
-
Maxime Jacquemin authored
-
Maxime Jacquemin authored
- Using Q.mul_2exp for pow2 - Simpler and correct implementation for log2 - Declaring the ten constant only once
-
Maxime Jacquemin authored
-
Maxime Jacquemin authored
- Add a Rational module that implements a field over rationals. - Add rationals to Datatype - Move field, nat, finite and linear into libraries/arithmetic - Update linear_filter_test to use the Rational module - Update oracles
-
Basile Desloges authored
[libc] Add specification for signal(sig, func) See merge request frama-c/frama-c!4895
-
- Feb 05, 2025
-
-
Julien Signoles authored
[kernel] remove unused Datatype.*.module_name and Type.*ml_name Closes #1489 See merge request frama-c/frama-c!4907
-
Basile Desloges authored
-
Basile Desloges authored
-
Basile Desloges authored
-
Basile Desloges authored
-
Basile Desloges authored
Add advice on `typing:no-proto` message See merge request frama-c/frama-c!4920
-
David Bühler authored
[scripts] Improve callgrind usage See merge request frama-c/frama-c!4925
-
Basile Desloges authored
-
Basile Desloges authored
-
Basile Desloges authored
-
Valentin Perrelle authored
-
Thibault Martin authored
Resolve "Failure when a GNU.body does not end with a Cabs.COMPUTATION" Closes #1475 See merge request frama-c/frama-c!4905
-
-
Thibault Martin authored
Add a parameter builder for decimal numbers See merge request frama-c/frama-c!4926
-
-
-
-
-
-
-