Search:

Type: Posts; User: awsdert

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    89

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

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

    by awsdert
    Replies
    43
    Views
    585

    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.
  16. Replies
    14
    Views
    367

    That's not correction, that's removal

    That's not correction, that's removal
  17. Replies
    14
    Views
    367

    Apparently you don't understand the concept of a...

    Apparently you don't understand the concept of a pointer, think of pointers as a phone and the data you want to pass as the phone numbers, when you want to pass a number you don't draw the phone and...
  18. Thread: FPN math

    by awsdert
    Replies
    43
    Views
    585

    I've no further ideas, this is as close as I've...

    I've no further ideas, this is as close as I've gotten, I'll probably leave it until late 2mw night or monday morning, until then I welcome new ideas:


    gcc -Wall -o "test_fpn" "test_fpn.c" &&...
  19. Thread: FPN math

    by awsdert
    Replies
    43
    Views
    585

    Some more changes and I got closer but not quite...

    Some more changes and I got closer but not quite to desired exponent (later tests proved the method wrong but for now will do until fix slight issue in mantissa (which I'm assuming is a data issue):...
  20. Thread: FPN math

    by awsdert
    Replies
    43
    Views
    585

    Well I managed to get the exponent of 0.101...

    Well I managed to get the exponent of 0.101 correct but I'm sure that is just a coincidence as 0.1's exponent comes out incorrect, either that or I'm missing a piece of logic:


    gcc -Wall -o...
  21. Thread: FPN math

    by awsdert
    Replies
    43
    Views
    585

    Gotta go to work now, I'm confident the mantissa...

    Gotta go to work now, I'm confident the mantissa is calculated correctly now but the exponent needs work:


    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
    43
    Views
    585

    At long last I got it, for that test anyway, the...

    At long last I got it, for that test anyway, the next test seems to skip the mantissa altogether:


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

    by awsdert
    Replies
    43
    Views
    585

    Some more tinkering got me back my 'C's gcc...

    Some more tinkering got me back my 'C's


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

    by awsdert
    Replies
    43
    Views
    585

    Occured to me I hadn't checked whole numbers...

    Occured to me I hadn't checked whole numbers greater than 1 so stuck in a test for 101.0, after some tinkering I got that to produce correctly and now I'm back to trying to fix the mantissa &...
  25. Thread: FPN math

    by awsdert
    Replies
    43
    Views
    585

    Thanks but I can't look at GCC code since doing...

    Thanks but I can't look at GCC code since doing so could result in me accidentally violating the GPL they're probably using, anyway I was thinking about it at work (which I'm still at) and realised...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4