Posts: 4,695
Threads: 222
Joined: Apr 2022
Reputation:
322
(11-22-2022, 09:08 PM)Chris Wrote: How to apply dec float here? It only gives part of the code.
rplus1 = c1plus1 MOD 1095
rminus1 = c1minus1 MOD 1095
v1 = 32336 * q + INT((15 * q + 765433 * R + 12084) / 25920)
v1plus1 = 32336 * qplus1 + INT((15 * qplus1 + 765433 * rplus1 + 12084) / 25920)
v1minus1 = 32336 * qminus1 + INT((15 * qminus1 + 765433 * rminus1 + 12084) / 25920)
v2 = v1 + INT(6 * (v1 / 7)) MOD 2
v2plus1 = v1plus1 + INT(6 * (v1plus1 / 7)) MOD 2
v2minus1 = v1minus1 + INT(6 * (v1minus1 / 7)) MOD 2
L2 = v2plus1 - v2
L2minus1 = v2 - v2minus1
v3 = 2 * (INT((L2 + 19) / 15) MOD 2)
v4 = INT((L2minus1 + 7) / 15) MOD 2
c2 = v2 + v3 + v4
v3plus1 = 2 * (INT((L2plus1 + 19) / 15) MOD 2)
v4plus1 = INT((L2 + 7) / 15) MOD 2
c2plus1 = v2plus1 + v3 + v4
L = c2plus1 - c2
c8 = INT((L + 7) / 2) MOD 15
c9 = -(INT((385 - L) / 2) MOD 15)
c3 = INT((384 * x3 + 7) / 13) + c8 * INT((x3 + 4) / 12) + c9 * INT((x3 + 3) / 12)
All those Integer conversions suggest to me you are looking for _INTEGER64 Type for for maximum Integer range.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
I have a # sign in my code next to each variable and there are errors. For the needs of the Forum, I have removed them. So, it is about floating point and xintegrate values depending on the formula.
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
_DEFINE A-Z AS _FLOAT
did not help
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
All those Integer conversions suggest to me you are looking for _INTEGER64 Type for for maximum Integer range.
And the results of this is?
Posts: 52
Threads: 9
Joined: Sep 2022
Reputation:
0
To sum up, in order not to extend it, write like this:
A ## = b ## / 548 * C ##
So double sign.
I'll check tomorrow. I am after 10 PM
Posts: 4,695
Threads: 222
Joined: Apr 2022
Reputation:
322
11-22-2022, 10:42 PM
(This post was last modified: 11-22-2022, 11:05 PM by bplus.)
(11-22-2022, 09:08 PM)Chris Wrote: How to apply dec float here? It only gives part of the code.
rplus1 = c1plus1 MOD 1095 ' what's c1plus???
rminus1 = c1minus1 MOD 1095 ' what's c1minus1 ???
v1 = 32336 * q + INT((15 * q + 765433 * R + 12084) / 25920) ' what's q what's R ???
v1plus1 = 32336 * qplus1 + INT((15 * qplus1 + 765433 * rplus1 + 12084) / 25920) ' what's qplus1 ??? q -1
v1minus1 = 32336 * qminus1 + INT((15 * qminus1 + 765433 * rminus1 + 12084) / 25920)
v2 = v1 + INT(6 * (v1 / 7)) MOD 2
v2plus1 = v1plus1 + INT(6 * (v1plus1 / 7)) MOD 2
v2minus1 = v1minus1 + INT(6 * (v1minus1 / 7)) MOD 2
L2 = v2plus1 - v2
L2minus1 = v2 - v2minus1
v3 = 2 * (INT((L2 + 19) / 15) MOD 2)
v4 = INT((L2minus1 + 7) / 15) MOD 2
c2 = v2 + v3 + v4
v3plus1 = 2 * (INT((L2plus1 + 19) / 15) MOD 2)
v4plus1 = INT((L2 + 7) / 15) MOD 2
c2plus1 = v2plus1 + v3 + v4
L = c2plus1 - c2
c8 = INT((L + 7) / 2) MOD 15
c9 = -(INT((385 - L) / 2) MOD 15)
c3 = INT((384 * x3 + 7) / 13) + c8 * INT((x3 + 4) / 12) + c9 * INT((x3 + 3) / 12)
Really this chunk of code is missing allot of values that QB64 will assume as 0 if we just tested this part.
Where did this code come from? If some language with arbitrary large integers like Python then need string math.
Anyone see the calculations for Easter, this looks like Easter on a planet not in our solar system with q moons ;-))
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever