in reply to Need more precision.

Hmm, going down the fixed-point route, in 2011 you asked: Module for 128-bit integer math?, which resulted in Math::Int128... test stats in Windows look a bit spotty, but it looks like it's actively maintained and maybe worth a try?

Replies are listed 'Best First'.
Re^2: Need more precision.
by BrowserUk (Patriarch) on Jun 09, 2015 at 21:52 UTC

    That was integer; this is float.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

      Got that, but Fixed-point arithmetic "is essentially an integer that is scaled by an implicit specific factor determined by the type. For example, the value 1.23 can be represented as 1230 in a fixed-point data type with scaling factor of 1/1000". This should work since you said your min/max is -4.0 to 4.0, which could be represented in a 128-bit integer as, for example, 0 to 80000000000000000000000000000000000000.

        Okay. I'll bite.

        Are you suggesting that I use 2 of salva's 128-bit integers to implement my own fixed-point math?

        Or are you suggesting that there is some way to use single 128-bit integers to store both a 64-bit precision and the fixed point mantissa; and have the existing 128-bit integer operations sort out he fixed-point stuff for me?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
        In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
Re^2: Need more precision.
by Anonymous Monk on Jun 09, 2015 at 21:48 UTC

    ... oh wait... are you asking about Perl or C?