bloomberg / pytest-memray

pytest plugin for easy integration of memray memory profiler
https://pytest-memray.readthedocs.io/en/latest/
Apache License 2.0
342 stars 24 forks source link

Exception thrown while trying to calculate ``math.log(0)`` #102

Closed gnufede closed 7 months ago

gnufede commented 9 months ago

Bug Report

Current Behavior

math.log(0) raises ValueError: math domain error

Expected behavior/code

No exceptions raised while trying to calculate the log of a number too close to zero.

Environment

Possible Solution

low = math.log(low) if low > 5e-324 else -750

Additional context/Screenshots

https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/52341/workflows/776c836a-ea10-4af8-8154-236971fa72fc/jobs/3333537

godlygeek commented 7 months ago

Done in #103