Show HN: Insect – a high-precision scientific calculator with physical units
121–130 of 205 posts
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#122So "megabytes" appears to be the power-of-ten unit, which is generally not that helpful in practice. ≫ 6 megabytes to bytes 6 MB -> B = 6000000 B Assuming you're sticking with the power-of-ten unit, that means you should really grow support for the (sigh) "mebibytes" family of units; i.e., what some folks are retro-actively calling the power-of-two byte unit. ≫ 6 mebibytes to bytes 6 × mebibytes -> B Unknown identifi…
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#123Needs more temperature scales than just kelvin. US Engineering units of energy would also be help certain people: such as BTUs British Thermal Units etc.
They are useful, of course, when it comes to simple unit conversions. But they lead to all kinds of problems if you start using them in calculations (which is what Insect is mostly for).
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#124Re: Show HN: Insect – a high-precision scientific calculator with physical units
#125Kudos! I would love to see two more things: 1. Propagation of uncertainty.[1] I often yearned for a calculator that automatically propagated uncertainties for me while writing my (high-school) lab reports. I think it would be life-saver functionality for many students at the very least. 2. True high-precision. I don't know how Insect works under the hood (so maybe you are already doing it this way) but instead of usi…
- Most existing calculators that offer propagation of uncertainty use a simplified formula -- the one with the square root and the partial derivatives. That's OK for lab courses. But in real life, the distributions of the input parameters are non-Gaussian, the formulas depend on each other in subtle ways that are easy to miss, and you have to deal with systematic and statistic errors (precision vs. accuracy). Most researches I know, myself included, sort-of fudge this with pen-and-paper and Excel, and end up underestimating their errors... In my view, the best solution is a Monte-Carlo type calculation, where you draw the input parameters from their respective distributions, then do the calculation, and repeat 10000 times. The mean and the std deviation gives you final result.
- Arbitrary precision is doable, but often unnecessary. To me, it was always more important to know when the result is numerical garbage (in which case I rearrange the equations to make them more computer-friendly), than to choose some precision up-front, hoping it would be enough. For me, interval arithmetic [1] is the best solution. All numbers are represented by the next higher and next lower floating point number, and each calculation results in a new interval, where the result is guaranteed to be in the interval. Often, the intervals blow up unnecessarily, but are still much smaller than the desired accuracy or precision. These days, whenever I get an unexpected result, I repeat the calculation with interval arithmetic in Mathematica or Matlab to exclude numerical errors. Interval arithmetic is not very costly in terms of run-time, and there are great libraries out there.
The unit-aware, uncertainty aware calculator that I ended up using for my PhD-thesis was Mathematica. Mathematica deals with units somewhat well and iterates over lists natively. You can write standard formulas and feed them lists for the Monte-Carlo calculation. However, unit calculations are extremely slow. My workaround split the calculation into one unit-calculation and 10000 unit-less calculations. However, I ran into so many Mathematica bugs and quirks that hosed the calculation ("transparent" Mathematica-updates that changed the result, file corruption (!), swalled minus-signs (!!)) that I cannot possibly recommend Mathematica for anything but toy projects.
Great work! I will keep a close eye on this awesom project!
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#126Looks pretty nice, but no light years? No attoparsecs? You don't even have hogsheads or fortnights!!!!!1! Still, it's pretty good.
Thank you for the feedback. I'm always open for suggestions on new units ( https://github.com/sharkdp/purescript-quantities )!
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#127So "megabytes" appears to be the power-of-ten unit, which is generally not that helpful in practice. ≫ 6 megabytes to bytes 6 MB -> B = 6000000 B Assuming you're sticking with the power-of-ten unit, that means you should really grow support for the (sigh) "mebibytes" family of units; i.e., what some folks are retro-actively calling the power-of-two byte unit. ≫ 6 mebibytes to bytes 6 × mebibytes -> B Unknown identifi…
I'd call them "MB (megabytes)" and "MMB" (marketing megabytes). Pretty clear.
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#128Earlier quoted context omitted.
All of these things work in Google, btw. Google has one of the best unit conversion tools, and it's built into the search.
I've always been frustrated by how Google's unit conversion doesn't integrate well with its calculator.
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#129Kudos! I would love to see two more things: 1. Propagation of uncertainty.[1] I often yearned for a calculator that automatically propagated uncertainties for me while writing my (high-school) lab reports. I think it would be life-saver functionality for many students at the very least. 2. True high-precision. I don't know how Insect works under the hood (so maybe you are already doing it this way) but instead of usi…
I absolutely agree with these requests! I am so desperate for an uncertainty-aware/unit-aware calculator that I tried implementing one myself, even though it is quite beyond my skill-set. I gave up and used Mathematica (more on that below). Two comments on the requests: - Most existing calculators that offer propagation of uncertainty use a simplified formula -- the one with the square root and the partial derivative…
Re: Show HN: Insect – a high-precision scientific calculator with physical units
#130Earlier quoted context omitted.
All of these things work in Google, btw. Google has one of the best unit conversion tools, and it's built into the search.
You can convert 100m to femtoparsecs, for example.
Unfortunaetly, the conversion 30 miles per gallon in liter/100 km still displays an equal sign, which is technically wrong. However, this conversion is so useful, that I won't complain about it.