Commit Graph

10 Commits

Author SHA1 Message Date
Arthur Camouseigt
018dd91ca1 [Probability] Changed distribution parameter's type to double
Plots are still rendered in float but computations are now in double

Change-Id: I7e0a38effb780861b1443ee92a097cd319de3bc8
2020-11-04 14:45:35 +01:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Neven Sajko
c92b770112 Performance fixes relating to floating point constants
This replaces unnecessary double-precision soft-float operations with
single-precision floating-point operations, mainly by casting.

In a couple places I also replace a function call with a constant.
2020-04-09 13:58:56 +02:00
Léa Saviot
dd97b23624 [apps/proba] k limit for Chi2 law
After the limit, P(X<k) returns undef
2019-09-06 10:40:59 +02:00
Émilie Feral
22d49f9a14 [apps/probability] Fix typo 2019-09-05 12:06:48 +02:00
Léa Saviot
1c34eab71e [poincare/solver] Fix precision handling in IncreasingFunctionRoot
Scenario: ChiSquared distribution, P(X<?) = 0.1
2019-09-04 16:55:39 +02:00
Léa Saviot
ff0105182d [apps/proba] P(X<?) = 0 gives 0 for ChiSquaredDistribution 2019-08-26 10:14:38 +02:00
Léa Saviot
83fda9a587 [apps/proba] Fix Chi Square computations
Because the values can be very small or very big, computations should
not be made sequentially, to prevent rounding errors.
For instace, for degrees of freedom = 70, coefficient() would return 0
event though the cumulativeDistributiveFunctionAtAbscissa was not 0.
2019-08-21 14:45:27 +02:00
Léa Saviot
bbf506ddb7 [apps/proba] Refactor law -> distribution 2019-08-20 17:16:19 +02:00