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" &&...
Type: Posts; User: awsdert
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" &&...
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...
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...
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 )...
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,...
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...
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...
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...
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...
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 */...
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...
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...
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...
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...
Updated my onlinegdb.com file, GDB online Debugger | Code, Compile, Run, Debug online C, C++
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...
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...
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;
Whoops, noticed I used the wrong comparison on the is_nil() one, however that wasn't the bug I was getting at, had to re-order the comparisons so that the bug showed since I added in that is_nil()...
I have a bug in my comparison code but I'm struggling to spot it, I'm hoping that someone here can:
int mcc__int_op_cmp( mcc_int_t const * const num, mcc_int_t const * const val ) {
mcc_bit_t...
Haven't been able to fix the function yet but thought I'd share something interesting, I was finding there was a lot of output where inifinity should or should not have been set and so to filter out...
Fixed it, I forgot to change a variable name when I copy - pasted AND forgot to convert the orginal hard comparison to soft comparison at the break condition of a loop, the former resulted in a...
Well been doing some more experiments, haven't been able to correct that off by 1 thing so have filtered that output in favour of really wrong results that can't be ignored, just now tried with...
Yeh but they are missing some accompanying pronouns, I forget which right now but it wasn't possible to produce suitable pronouns to accompany them, also they can also apply to a group of people...
Enough said :P