utahplt / TrackedFloats.jl

Julia library providing tracking of floating point errors through a program resources
https://juliahub.com/ui/Packages/FloatTracker/dBXig/1.0.0
MIT License
27 stars 3 forks source link

Consider: override base-level arithmetic operations for more aggressive NaN injection #17

Open ashton314 opened 1 year ago

ashton314 commented 1 year ago

A current limitation of FloatTracker is that we can only inject NaNs after we have "infected" some numbers with a NaN. What if we were to have the option of entirely overriding the functions in Base—with the types that they have normally—to more aggressively (and automatically?) inject NaNs?

We might be able to do this with a macro: some kind of switch that controls what macros we emit, and then we can only emit that override code when the switch is flipped.