Hacker News new | ask | show | jobs
by eitally 585 days ago
Which is cool and all, but totally unnecessary for approximately 100% of users. You should at least provide an option to do everything in js.

Also, for ux reasons, I'd love this as a browser extension. Cloudy Calculator can do a lot of it but was recently deprecated as a result of the Manifest v2->v3 requirement from Google.

1 comments

When a user converts, for example, 0.0001 millimeters to miles, most of converters out there will fail to provide the correct result due to precision loss. I know, it’s rare case, but we want to ensure that we can handle all cases without exception.
Your site doesn't work by that standard. English<=>metric distance eventually comes down to how accurately you can represent 1/127 (because 1in==25.4mm). 1/127 repeats after 42 digits and you only support 28.

You can't give exact answers without representing everything as fractions, even for the easy ones like mm to miles. With that being true, anything more than JavaScript's own precision is probably unhelpful.

The kind of person solving problems where they'd need to convert between miles and mm would rewrite the constant as "1mi = 1,609,344mm". No one in the real world is adding up 0.0001mm intervals until they get to a mile, so you're solving for a problem that doesn't actually exist.

That’s right - we cannot beat lack of fractions support with whatever high precision. It’s a feature that we are currently missing.