Search found 629 matches

by Allanon
Thu Jul 09, 2020 8:26 pm
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Re: Problems with big integers and some Hollywood operators

There is no problem adapting the code for me now that I know the problems :) When you have to port something like this and you start getting thousand of errors in your face, the debug sessions become hell :D I suggest you to document how math works on Hollywood and to specify when there are differen...
by Allanon
Thu Jul 09, 2020 6:26 pm
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Re: Problems with big integers and some Hollywood operators

Yep, but if you use % :

Code: Select all

local a = -10225030983111
local d = 2^24
print(a % d)
You get:

Code: Select all

11080249.0
:)
by Allanon
Thu Jul 09, 2020 5:21 pm
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Re: Problems with big integers and some Hollywood operators

I'm on WIndows 10, but if you look at the link nr.2 they say that both results are valid even if the positive one is more mathematics-friendly.
Every online calculator I found returned the positive result, I'm not too into deep-math-stuff :)
by Allanon
Thu Jul 09, 2020 4:37 pm
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Re: Problems with big integers and some Hollywood operators

Ok, for the << >> operators, I can use the division/multiplication even if it is slower but the fact is that I didn't know how they was implemented thinking (wrongly) that all #NUMBERS was treated/stored in the same way :) About the modulo: 1. Calculator online : link 2. Another one with an explanat...
by Allanon
Wed Jul 08, 2020 5:37 pm
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Re: Problems with big integers and some Hollywood operators

Found another wrong behaviour: Local a = -10225030983111 Local d = 2^24 DebugPrint(Mod(a, d)) It prints -5696967 but it is wrong!! The correct answer should be : 11080249 Infact using a trick to calculate the modulo of negative numbers the result is right: Local a = -10225030983111 Local d = 2^24 De...
by Allanon
Wed Jul 08, 2020 11:51 am
Forum: Hollywood bugs
Topic: Problems with big integers and some Hollywood operators
Replies: 9
Views: 190

Problems with big integers and some Hollywood operators

I'm having trobles porting a pure Lua library to implement the HMAC-SHA256 that I need to authenticate requests to communicate with a server, so I started to convert it but when has come the time for a test I got errors and wrong numbers here and there. After long debug sessions I've found several p...
by Allanon
Sat Jun 13, 2020 5:32 pm
Forum: Mailing list archive
Topic: [27 Jun 2011] MatchPattern broken on Windows(7)
Replies: 4
Views: 86

[15 Jul 2011] Re: MatchPattern broken on Windows(7)

<r><I><s>[i]</s><SIZE size="85"><s>[size=85]</s>Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 15 Jul 2011 20:55:38 -0000</SIZE><e>[/i]</e></I><i>[/size]</i><br/> <br/> Hi Andreas, how about implementing the Lua string library? In particular could be ve...
by Allanon
Sat Jun 13, 2020 5:32 pm
Forum: Mailing list archive
Topic: [27 Jun 2011] MatchPattern broken on Windows(7)
Replies: 4
Views: 86

[16 Jul 2011] Re: MatchPattern broken on Windows(7)

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 16 Jul 2011 20:01:14 -0000

Great! Thank you Andreas! :)
by Allanon
Sat Jun 13, 2020 5:32 pm
Forum: Mailing list archive
Topic: [13 Feb 2011] Debug & Helpers Libraries
Replies: 0
Views: 30

[13 Feb 2011] Debug & Helpers Libraries

<r><I><s>[i]</s><SIZE size="85"><s>[size=85]</s>Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 13 Feb 2011 23:01:08 -0000</SIZE><e>[/i]</e></I><i>[/size]</i><br/> <br/> Hello all, I've published the first two (simple) libraries I've made during the deve...
by Allanon
Sat Jun 13, 2020 5:32 pm
Forum: Mailing list archive
Topic: [26 Feb 2011] dont understand args
Replies: 2
Views: 50

[27 Feb 2011] Re: dont understand args

<r><I><s>[i]</s><SIZE size="85"><s>[size=85]</s>Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 27 Feb 2011 00:09:56 -0000</SIZE><e>[/i]</e></I><i>[/size]</i><br/> <br/> Hello, In your code you have defined the first two arguments as fixed, after them th...