;0Oµ_8H1¦%8ỊTḢ_<48TḢƊ_>¥0ɓVærO;0µ_8H1¦%8ỊTḢ_<48TḢƊ_>¥0ɓVær Try it online!Try it online! Or see the test-suitetest-suite.
;0Oµ_8H1¦%8ỊTḢ_<48TḢƊ_>¥0ɓVærO;0µ_8H1¦%8ỊTḢ_<48TḢƊ_>¥0ɓVær - Link: list of characters, S ;0O - ordinal (vectorises across S) ;0 - concatenate a zero O - ordinal- (vectorises)to (zerocater ->BOTH zerofor no '0', '1', '8', or '9' AND for no '.') µ - start a new monadic link (call that X) _8 - subtract eight (vectorises across X) ¦ - sparse application... 1 - ...to: indices: one H - ...do: halve (i.e. halve first ordinal) %8 - modulo by eight (vectorises) Ị - insignificant (abs(v)<=1?) (vectorises) T - truthy indices Ḣ - head Ɗ - last three links as a monad (i.e. f(X)): <48 - less than 48? (i.e. was it a '.' in S or the added 0?) T - truthy indices Ḣ - head _ - subtract ¥ - last two links as a dyad < 0 - less than zero? (1 if so 0 otherwise) _ - subtract ɓ - start a new dyadic chain (i.e. f(S,X)) V - evaluate S as Jelly code (i.e. get S as a float) ær - round to the nearest multiple of 10^(-X)