Search:

Type: Posts; User: awsdert

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    38

    Turned out the problem was with add_bibit(), I...

    Turned out the problem was with add_bibit(), I forgot to filter out the scenario where bits % sizeof(biseg_t) AND bits < bitsof(biseg_t) were true.
  2. Replies
    1
    Views
    38

    Bignum math: right shift

    Thought that maybe my FPN math for double's with large exponents was giving wrong result because of insufficient integer size so I decided to write a all in one bignum math file and then try with...
  3. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    I got it :) GDB online Debugger | Code, Compile,...

    I got it :)
    GDB online Debugger | Code, Compile, Run, Debug online C, C++
    Changed this:


    if ( num ) {
    for ( ; !(num & 1u); ret.val.exp++, num >>= 1 );
    for ( NUM = num; NUM > 1; ++pos,...
  4. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well partially resolved the incorrect mantissa on...

    Well partially resolved the incorrect mantissa on hexadecimal, added a new line in the following block:


    if ( num ) {
    for ( ; !(num & 1u); ret.val.exp++, num >>= 1 );
    for ( NUM = num; NUM...
  5. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Ahh ok, well anyways I'm now testing on...

    Ahh ok, well anyways I'm now testing on hexadecimal as well, I've got it to work where either side of the decimal point is 0 but still need to work on the both sides set scenario, for now I'm...
  6. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    As I stated before I plan to implement larger...

    As I stated before I plan to implement larger sized floats than what is supported by even long double, to this end I need to implement the logic myself (which I have fixed just now btw, just need to...
  7. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well I've just tried using a gcc extension...

    Well I've just tried using a gcc extension (__int128) to see if any bits were being cropped before setting pos, it was not.
  8. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well IEE754 has the highest likelihood of...

    Well IEE754 has the highest likelihood of matching what modern CPUs do atm so I'd rather have results matching that and WOW 6000 lines, man that is a lot, did they have a list of those edge cases?...
  9. Replies
    4
    Views
    226

    Incorrect use of the word xey at this point, the...

    Incorrect use of the word xey at this point, the x* family of nouns were invented (by someone else, not me) to fill a need for gender neutral words in the english language:
    xey=he/she
    xem=him/her...
  10. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    I appreciate the effort but that effecttively...

    I appreciate the effort but that effecttively amounts to just a hack, I'm planning for this to support literals like 0.1f36 or 0.1f128 and not just base 2, 10 & 16 but anything between 2 to 62, to...
  11. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well my latest attempt shows promise, no code...

    Well my latest attempt shows promise, no code that looks like a hack to me, just got 2 inputs providing erronous output
    GDB online Debugger | Code, Compile, Run, Debug online C, C++
  12. Replies
    0
    Views
    70

    Unwanted cropping occuring

    I don't understand why this:


    void printb( void const * addr, size_t const bits ) {
    size_t size = bits / CHAR_BIT, b = 0;
    uchar const *a = addr;
    uchar val;
    if ( bits % CHAR_BIT ) ++size;...
  13. Replies
    4
    Views
    226

    I think xey wants us to laugh at xem for thinking...

    I think xey wants us to laugh at xem for thinking we would do xer task for xem XD
  14. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well I managed to correct the 3.14e+8 by changing...

    Well I managed to correct the 3.14e+8 by changing

    if ( add_half ) fpn = base / 2;
    to

    if ( add_half ) fpn = one / 2;
    I'm now left with just one to correct
  15. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    GDB online Debugger | Code, Compile, Run, Debug...

    GDB online Debugger | Code, Compile, Run, Debug online C, C++
    I've almost cracked it, it seems I'm one more piece of code away from correct reading of the value (at least in positive cases)


    gcc...
  16. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Erm, decided to test tonight after all, turned my...

    Erm, decided to test tonight after all, turned my hack was close to what should be done, I was just slightly off with what I was doing, currently I have 1e+/-# seemingly fully working, .1e+# (and...
  17. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well I finally got the exponent AND mantissa...

    Well I finally got the exponent AND mantissa right in 1e+# scenario, although by means of a hack (or at least I'm calling it that until I do more testing 2mw)


    ufpn
    fpn_make (ulong base, ullong...
  18. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    While playing around with my function I stumbled...

    While playing around with my function I stumbled across what I should fill mine.exp with when handling the e+# part of a value:


    gcc -Wall -o "test_fpn" "test_fpn.c" && "./test_fpn"
    man t =...
  19. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Unhelpful but fair enough, at least I have a...

    Unhelpful but fair enough, at least I have a rough idea of how to shift the fpn into the int part but I'll deal with that when I can get consistant results with 1e+#, one step at a time after all
  20. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well I managed to touch upon what I'm supposed to...

    Well I managed to touch upon what I'm supposed to do with the exponent, turns out that gets processed 1st:


    ...
    man t = 3EBC20 m = 75E100 exp t = 99 m = 96 sig t = 0 m = 0
    fpn t = 1.000000e+08...
  21. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Well I finally got my computer back up and...

    Well I finally got my computer back up and running (its the reason I went quiet for a few days) and was gonna put my code on online gdb but then decided nah start afresh instead (GDB online Debugger...
  22. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Realised everything was displayed backwards so I...

    Realised everything was displayed backwards so I just changed the above to this:


    void printb( uchar *hex, size_t bits ) {
    size_t B = (bits / CHAR_BIT)// + !!(bits % CHAR_BIT)
    , b = 0;...
  23. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    For more verbose results: void printb( uchar...

    For more verbose results:


    void printb( uchar *hex, size_t size ) {
    size_t i;
    uchar bit;
    for ( i = 0; i < size; ++i ) {
    putchar(' ');
    for ( bit = SCHAR_MIN; bit; bit >>= 1 ) {...
  24. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    Potentially on right track with this one, at...

    Potentially on right track with this one, at least the exponent is closer than I've ever had it before:


    gcc -Wall -o "test_fpn" "test_fpn.c" && "./test_fpn"
    test.exp 00 mine.exp 00 test.man...
  25. Thread: FPN math

    by awsdert
    Replies
    55
    Views
    851

    GOT IT! gcc -Wall -o "test_fpn" "test_fpn.c"...

    GOT IT!


    gcc -Wall -o "test_fpn" "test_fpn.c" && "./test_fpn"
    test.exp 00 mine.exp 00 test.man 000000 mine.man 000000 test.fpn 0.000000e+00 mine.fpn 0.000000e+00 text '0'
    test.exp 7F mine.exp...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4