3 ms·
Hmm, I find the auto-associativity to be a bit weird for example: ≫ 1/12 c 1 / (12 × c) = 2.7797e-10 s/m
by forgotpwtomain 9y ago
Hmm, I find the auto-associativity to be a bit weird for example:
≫ 1/12 c
1 / (12 × c)
= 2.7797e-10 s/m
- sharkdp 9y agoThank you very much for the feedback! This is on purpose (see operator precedence rules: https://github.com/sharkdp/insect#reference 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 write "1/12*c". I agree that it can be confusing at times (that's why there is a pretty printer), but I don't want the language/parser to be whitespace-aware.
- nine_k 9y agoApparently unit-less constants should bind stronger: 1/4 s - > (1/4) s 1 m / 4 s - > (1 m) / (4 s)