Search:

Type: Posts; User: awsdert

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  2. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  3. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  4. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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.
  5. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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?...
  6. Replies
    4
    Views
    218

    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...
  7. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  8. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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++
  9. Replies
    0
    Views
    66

    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;...
  10. Replies
    4
    Views
    218

    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
  11. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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
  12. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  13. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  14. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  15. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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 =...
  16. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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
  17. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  18. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  19. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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;...
  20. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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 ) {...
  21. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  22. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    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...
  23. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    Well I made some more changes and got as far as...

    Well I made some more changes and got as far as this:


    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...
  24. Thread: FPN math

    by awsdert
    Replies
    54
    Views
    807

    I don't have time to fix it now but I've learned...

    I don't have time to fix it now but I've learned the issue with the last one is that it continues the loop 1 time too many so anyone trying to fix it themselves keep that in mind.
  25. Replies
    14
    Views
    381

    That's not correction, that's removal

    That's not correction, that's removal
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4