You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for negative numbers just landed in delvtech/hyperdrive-rs#186. The wrappers should be updated to avoid bugs from accidentally passing a negative number to the lib and any special handling of negative numbers should be cleaned up. For example:
Ran into a few gotchas integrating the generic FixedPoint type into the lib. One of them has been resolved via rustwasm/wasm-bindgen#4082, but I'm still working through the rest.
After some initial struggles with the bindings, I started porting everything over to TypeScript and using BigInts directly to avoid being limited by the largest signed type implemented in the fixedpointmath, I256. However, I realized the ln function is pretty cryptic and super optimized for efficiency and I think it would be better if both libs were built on the same source code rather than blindly porting it over and risking confusing errors from slight differences in how each language handles the bit operations.
I could have the TypeScript port use a binding of just the ln function, but for now I'm back to trying to make the bindings work, but with some new learnings gained while porting that will make it more efficient, easier to use, and slightly less bug prone.
Support for negative numbers just landed in delvtech/hyperdrive-rs#186. The wrappers should be updated to avoid bugs from accidentally passing a negative number to the lib and any special handling of negative numbers should be cleaned up. For example:
hyperdrive-frontend/apps/hyperdrive-trading/src/base/formatRate.ts
Lines 4 to 10 in 9c7f6d7
The text was updated successfully, but these errors were encountered: