About fractional tuple library i propose

hello i made a library which meant to express fractions with struct(tuple), and some computes between them

and which is made possible by as solidity 0.8.0 is able to make a function to return a struct

can i get any help finding bugs or extra features should it be included?
if possible it would be really appreciating

1 Like

I haven't reviewed the code but I will say you should have a really good (automated) test suite. As far as I can tell there are no tests.

1 Like

thank you for your advice!
as soon as i learn how to use js, i shall code test in js.

1 Like

Another thought, is that the time complexity of each function should be documented. This is particularly important because of the gas constraints of the environment.

1 Like

okay i think you are getting me into the track
thanks a lot i'll try to figure it out to make features you've mentioned

2 Likes