The toPrecision() method returns a string representing the Number object to the specified precision.
More information:
I think I can handle this. :)
I assume it'll live in number/mod.rs?
I assume it'll live in number/mod.rs?
Yes. There already is the to_precision function but its not implemented here
Hello, I'm finally moving on this, sorry for the delay. I understand what we are trying to do with toPercision, but I have a few questions concerning the ECMA documentation:
Thanks! Best,
Actually I think I just figured out #1. It's just a fancy way of saying n * 10^(e - p + 1) - x
The other questions still stand, but I think my assumptions are correct with those as well.
Best,
Hi @zanayr
Maybe checking other engines implementation will help:
V8: https://github.com/v8/v8/blob/4b9b23521e6fd42373ebbcb20ebe03bf445494f9/src/conversions.cc#L1159-L1225
SpiderMonkey: https://searchfox.org/mozilla-central/source/mfbt/double-conversion/double-conversion/double-to-string.cc#296-353
Hope this helps :)
Hello @zanayr, how is this going?
Hello @zanayr, how is this going?
Hello @Razican, Apologies I have been extremely busy and this slipped my mind. I think I left off somewhere still trying to figure out the math behind 9a. I don't know if I can figure it out, perhaps I should've picked an easier issue. 馃槄
Hello @zanayr, how is this going?
Hello @Razican, Apologies I have been extremely busy and this slipped my mind. I think I left off somewhere still trying to figure out the math behind 9a. I don't know if I can figure it out, perhaps I should've picked an easier issue. sweat_smile
Would you like us to un-assign it from you? Or would you like to create a draft PR to get some feedback / help?
Hello @zanayr, how is this going?
Hello @Razican, Apologies I have been extremely busy and this slipped my mind. I think I left off somewhere still trying to figure out the math behind 9a. I don't know if I can figure it out, perhaps I should've picked an easier issue. sweat_smile
Would you like us to un-assign it from you? Or would you like to create a draft PR to get some feedback / help?
I probably should be un-assigned, I don't have the bandwidth to work on it right now, and I didn't really get that far to begin with. Apologies again, as soon as I am more free, I will return for to help on this project.
Hey ! I'm currently working on this.