Search:

Type: Posts; User: awsdert

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds; generated 25 minute(s) ago.

  1. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Okay, seems that previous 100% on the fast...

    Okay, seems that previous 100% on the fast version was a fluke, probably skipped or something, anyways the limit of a 1000 was taking too long and given how old my CPU is I didn't wanna stress it...
  2. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Might've been in an infinite loop, had been...

    Might've been in an infinite loop, had been running for a while so I force quit and looked for possible causes, added back in a check for one being multiplied into nil and am now re-running, also due...
  3. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Just finished doing like for like code on the...

    Just finished doing like for like code on the bigint math version of mcc_fpn_make() - mcc_big_make() - and it seems the problems I was having with fpn_make() on those final few were actually just...
  4. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Edit: just uploaded the code: GDB online Debugger...

    Edit: just uploaded the code: GDB online Debugger | Code, Compile, Run, Debug online C, C++
    Managed to resolve the nil thing and most of the exponent off by 1s, now just need to resolve a few more...
  5. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    I seem to have found where to do the rounding: ...

    I seem to have found where to do the rounding:


    if ( tmp.pos > limits.man_bits ) {
    tmp.pos -= limits.man_bits;
    tmp.fpn = 0;
    tmp.fpn = ~(tmp.fpn);
    tmp.fpn <<= tmp.pos;
    tmp.fpn =...
  6. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Well I think I finally fixed the exponent issue...

    Well I think I finally fixed the exponent issue since issues I'd been have with the really small ones have disappeared in tests, currently trying to diagnose why my mantissa is quite shifted enough...
  7. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Seems the exponent is real stubborn about dying...

    Seems the exponent is real stubborn about dying as as an issue, is frequently 1 off
    I managed to upload my recent code to onlinegdb this morning
    GDB online Debugger | Code, Compile, Run, Debug...
  8. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Made a couple of minor modifications to kill...

    Made a couple of minor modifications to kill possible infinite loops and clear fpn if equal to half tmp.one but still no luck in getting the rounding right:


    gcc -Wall -o "mcc_fpn" "mcc_fpn.c" &&...
  9. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Thanks, got me started on the correct rounding...

    Thanks, got me started on the correct rounding mode but I'm struggling to understand which data to change and when, here's what I got, if you understand what it means could you point it out for me...
  10. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    While I was looking for understandable docs on...

    While I was looking for understandable docs on reading negative exponents I found this:
    String To Floating Point Number Conversion
    So I'm gonna make use of that in my free time to start again using...
  11. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Turned out I was calculating pos wrong from the...

    Turned out I was calculating pos wrong from the outset, I now have a variant of this in big_make()


    else {
    for ( NUM = temp.one; NUM > temp.fpn; --pos, NUM >>= 1 );
    if ( NUM == temp.fpn )...
  12. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Got a bit further with the negative exponent...

    Got a bit further with the negative exponent problem, as I suspected it wasn't just -100 causing it, I had tor remove a check for beyond min_exp and put it elsewhere
    GDB online Debugger | Code,...
  13. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Seems something about the size caused an infinite...

    Seems something about the size caused an infinite loop, either that or it takes too long, either way I'm doing some more checks on the math, switched back to float and did the test for the text and...
  14. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    I GOT IT! Turned out in big_make() I had...

    I GOT IT!
    Turned out in big_make() I had forgotten to change how I check if there was a whole number or not when I duplicated fpn_make() to transform the logic from hard numbers to soft numbers. So...
  15. Replies
    5
    Views
    111

    I wanted a thread safe version that was not easy...

    I wanted a thread safe version that was not easy to predict, I don't need impossible just hard enough that outside a test scenario it would be pretty hard to predict without first finding out when...
  16. Replies
    5
    Views
    111

    This is the closest to unpredictable as I can get...

    This is the closest to unpredictable as I can get it, while one can predict to an extent what range a number will fall in, those numbers can be wildly different in magnitude so trying to brute force...
  17. Replies
    5
    Views
    111

    Managed to make it a bit more random: long...

    Managed to make it a bit more random:


    long mcc__rnd( mcc_rnd_t *ctx, long min, long max ) {
    /* With bit unitialised it should be much harder to predict
    * if 1 or 0 will be recieved */...
  18. Replies
    5
    Views
    111

    After a google search I found a copy of what I...

    After a google search I found a copy of what I used (forgot I had put one in the mitsy code) but that wound up crashing so now I went with something different:


    typedef clock_t mcc_rnd_t;
    long...
  19. Replies
    5
    Views
    111

    Psuedo random generator with min max

    Can't find my old thread on min max so asking again, I made this function which should be as close to random numbers getting on a computer without internet connection for that random.com or whatever...
  20. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    I've finally managed to fix some underlying...

    I've finally managed to fix some underlying issues with my bignum core functions and big_make() managed to actually produce all (aside from off by 1) correct on the #.0 side of things, now I'm trying...
  21. I don't think I ever said that was my initial...

    I don't think I ever said that was my initial programming langauge, I started off with VB6 in college (don't think I ever actually questioned integers and pointers beyond how it is actually...
  22. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Updated my onlinegdb.com file, GDB online...

    Updated my onlinegdb.com file, GDB online Debugger | Code, Compile, Run, Debug online C, C++
  23. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Didn't have a reply for this when I 1st read it...

    Didn't have a reply for this when I 1st read it but now I do soo...
    It's great to know the user who took enough interest to star mitsy is also using the same forum, if all users/devs that took an...
  24. Thread: FPN math

    by awsdert
    Replies
    84
    Views
    1,665

    Well I half fixed the infinity issue, there's no...

    Well I half fixed the infinity issue, there's no more values becoming infinite when they shouldn't but the reverse still needs to be fixed for values that should become infinite, gonna catch some...
  25. Replies
    2
    Views
    68

    I finally fixed it, I changed the end of the...

    I finally fixed it, I changed the end of the function to this:


    nb = (*(n.seg) & n.bit) ? 1 : 0;
    vb = (*(v.seg) & v.bit) ? 1 : 0;
    if ( nb != vb ) return (nb > vb) ? 1 : -1;
    return 0;
Results 1 to 25 of 497
Page 1 of 20 1 2 3 4