Live data from Hacker News

Show HN: Insect – a high-precision scientific calculator with physical units

insect.sh

101–110 of 205 posts

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#101
post #98

hmmm, I'm a little bit skeptical about this. I'd be cool to have this as a python script somewhere but I am not quite sure wether I would visit this site whenever I need to calculate some physical units, especially since google already covers most of my needs dont get me wrong, I think otherwise it looks and feels great and is easy to use but I dont know who will use this.

Thank you for the feedback. Fair point: Google's unit conversion is really good. For me, there's mainly two things that stand out compared to using a Google search:

* The REPL: I wanted an interactive terminal-style calculator where I could press Arrow-Up and easily change a few things. It also lets me define my own variables and use them in my calculations. It saves the history so I can come back and press Ctrl-R to find a recent calculation.

* Combination of Web- and terminal version. I often work in the terminal instead of the browser where I can easily use the CLI version of insect.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#103
post #82
post #27

2**100+1-2**100 Equals 0?

It seems it uses approximate floating point arithmetics, with 30 digit precision.

A confusing thing is that the program seems to be using the purescript-quantity library which uses the purescript-decimals library which is arbitrary precision numbers, if I followed the dependencies correctly.

The readme also advertises it can deal with 10^(10^10), which it can (doubles can't deal with this, so it's definitely not just using Javascript doubles). The part which prints out numbers rounds to 6 places, but I don't see any place which rounds intermediate results.

Edit: Found where 30 digits comes in. https://github.com/sharkdp/purescript-decimals/blob/ad719fc7...

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#106
post #84

> high precision ≫ e*1e15 e × 1000000000000000 = 2718280000000000 Needs a bit of work, I think.

I realize it looks confusing in this example but this is just how it is displayed (with 6 significant digits). The internal precision is 30 digits.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#108
post #29

Earlier quoted context omitted.

I've always been frustrated by how Google's unit conversion doesn't integrate well with its calculator.

That's why 99% of the time there's no need to use the calculator, just type your formula straight into the search.

And use a remote server with at least 1RTT of delay to do basic arithmetic. Big Data indeed.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#109
post #28

Hmm, I find the auto-associativity to be a bit weird for example: ≫ 1/12 c 1 / (12 × c) = 2.7797e-10 s/m

Thank you very much for the feedback! This is on purpose (see operator precedence rules: https://github.com/sharkdp/insect#reference ). Implicit multiplication (without an explicit multiplication operator) has a higher precedence than division in order for something like this to work: tan(15cm/3m) = tan(15cm/(3m)) On the other hand, explicit multiplication has a lower precedence than division, so you would have to wr…

See how GNU units resolves this:

  1/10 m -> 0.1 / m
  1|10 m -> 0.1 m
  27 ^ 2/3 -> 243
  27 ^ 2|3 -> 9
You get the gist of it - a division operator with insane precedence.

Re: Show HN: Insect – a high-precision scientific calculator with physical units

#110
post #96

≫ round(pi * 100000000000000000) = 314159265358979324 ≫ round(pi * 1000000000000000000) = 3141590000000000000 (similar comment by @btown down there about e)

This is only how it is displayed, internal precision is always 30 digits.

Floating point numbers are displayed with 6 significant digits

Integers are displayed with all digits, unless there are more than ~20 digits, then it is displayed with exponential notation

Post reply on HN