array shifter - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7) +---- Thread: array shifter (/showthread.php?tid=907) Pages:
1
2
|
RE: array shifter - Kernelpanic - 09-22-2022 To use this practically you would have to put it in a header file, something like in C. For example: <numeric.h>. And in the program one access it via "_bignumberXY". But there are also "everyday" problems with decimal numbers. See screenshot: QB64 above, then in C, Win-Calculator, and then in C in Linux (well, it's just the same GCC). The question is, which result is correct in practice? So the back calculation. In QB64 - 3.2 Code: (Select All) Option _Explicit In C Code: (Select All) #include <stdio.h> RE: array shifter - Jack - 09-23-2022 I spent almost all day trying to port my binary math routines to QB64 but it's impossible, so I am rewriting it as a C include, so far so good. the reason it's impossible is because the routines use the full 32-bits of the Long and trying to do comparisons is unworkable, believe me I tried RE: array shifter - SpriggsySpriggs - 09-23-2022 I still don't know for what purpose you'd need such precision. Are we building rockets to the moon? RE: array shifter - Pete - 09-23-2022 (09-23-2022, 02:56 PM)Spriggsy Wrote: I still don't know for what purpose you'd need such precision. Are we building rockets to the moon? Well certainly not our moon. Moons in the Alpha Centauri star system, well, now you're getting closer. Pi calculations, and probably some other math problems to solve, or to approximate, need a better mouse trap than DOUBLE, etc. provide. String math, what Jack is doing with bit shifting, etc. are all valid, interesting, albeit, very involved ways of avoiding DOUBLE trouble. Pete RE: array shifter - Jack - 09-23-2022 Spriggsy, it's only for the challenge, for me numbers are an interesting pastime RE: array shifter - Pete - 09-23-2022 "Only for the challenge." You mean I won't be vacationing on Risa anytime soon? Dammit! Pete |