diffix / syndiffix

Python implementation of the SynDiffix synthetic data generation mechanism.
Other
6 stars 1 forks source link

divide-by-zero in floor_by function #133

Closed yoid2000 closed 8 months ago

yoid2000 commented 8 months ago

In solver.py, the following code hits divide-by-zero when n is 0.0

def _floor_by(n: float, x: float) -> float:
    return math.floor(x / n) * n

https://github.com/diffix/syndiffix/blob/6abe392a4703f22d55f1c51ae0849bccc721ba2b/syndiffix/clustering/solver.py#L21-L26