This is perfect for jq[0]. [0] https://github.com/stedolan/jq
Why does jq need arbitrary precision floating-point numbers?
LibBF – a small library to handle arbitrary precision floating point numbers
31–40 of 63 posts
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#32Earlier quoted context omitted.
As you said, this is equivalent to factorisation in terms of complexity. The Wikipedia article[0] on the subject does a good job of summarising the details of this in the section "Other properties of repeatend lengths". For a simple answer, the lengths are bounded above by Euler's totient function [1] (the sum of factors) of the denominator. Any tighter bounds depend on the specific primes in the factorisation. Note…
That Wikipedia article on repeating decimals is probably where I started looking into it, but the article is somewhat weird. For many problems Wikipedia articles say we know this and that but those other things are still unknown, this article has a lot of information but does not talk about unknown things at all. The length of the repeating fractional part of 1 / n divides φ(n)...and then nothing. Is this all we know…
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#33Earlier quoted context omitted.
As you said, this is equivalent to factorisation in terms of complexity. The Wikipedia article[0] on the subject does a good job of summarising the details of this in the section "Other properties of repeatend lengths". For a simple answer, the lengths are bounded above by Euler's totient function [1] (the sum of factors) of the denominator. Any tighter bounds depend on the specific primes in the factorisation. Note…
That Wikipedia article on repeating decimals is probably where I started looking into it, but the article is somewhat weird. For many problems Wikipedia articles say we know this and that but those other things are still unknown, this article has a lot of information but does not talk about unknown things at all. The length of the repeating fractional part of 1 / n divides φ(n)...and then nothing. Is this all we know…
Finding the order of an element in a group is a hard problem on par with factoring http://mathworld.wolfram.com/GroupOrder.html
I'm not sure about cases where the state space doesn't form a multiplicative group, but I doubt that it gets much easier.
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#34Earlier quoted context omitted.
That Wikipedia article on repeating decimals is probably where I started looking into it, but the article is somewhat weird. For many problems Wikipedia articles say we know this and that but those other things are still unknown, this article has a lot of information but does not talk about unknown things at all. The length of the repeating fractional part of 1 / n divides φ(n)...and then nothing. Is this all we know…
MathWorld is often a decent resource for finding this kind of information: " rel="nofollow">http://mathworld.wolfram.com/DecimalPeriod.html> , but it's often difficult to arrive at those pages if you don't have any idea where to start.
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#35Earlier quoted context omitted.
That Wikipedia article on repeating decimals is probably where I started looking into it, but the article is somewhat weird. For many problems Wikipedia articles say we know this and that but those other things are still unknown, this article has a lot of information but does not talk about unknown things at all. The length of the repeating fractional part of 1 / n divides φ(n)...and then nothing. Is this all we know…
MathWorld is often a decent resource for finding this kind of information: " rel="nofollow">http://mathworld.wolfram.com/DecimalPeriod.html> , but it's often difficult to arrive at those pages if you don't have any idea where to start.
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#36Re: LibBF – a small library to handle arbitrary precision floating point numbers
#37Earlier quoted context omitted.
Why does jq need arbitrary precision floating-point numbers?
Because JSON's spec defines a "number" as an arbitrary-precision floating point number, no limit on how many digits can be before or after the decimal or on what positive or negative integers you can put after the "e". Despite the name "JavaScript Object Notation," it does not inherit JavaScript's traditional interpretation that a "number" is an IEEE 754 double. (JSON also does not permit infinities or NaN, which Jav…
Re: LibBF – a small library to handle arbitrary precision floating point numbers
#38For those that don't know, Fabrice Bellard is the author of ffmpeg [1], the tiny c compiler (tcc) [2], linux in the browser [3] among many others [4]. Does anyone know how LibBF stacks up against GMP? [5] [1] http://ffmpeg.org/ [2] https://bellard.org/tcc/ [3] https://bellard.org/jslinux/ [4] https://bellard.org/ [5] https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithme...
I like the stuff he did for software radio decoding too.