Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Xeda112358

Pages: 1 ... 249 250 [251] 252 253 ... 317
3751
Math and Science / Re: Random Number question
« on: March 17, 2011, 04:23:18 am »
Yeah, sorry :D Actually, I just realised I typed up the wrong equation...

What I meant to say is that I multiply rand by floor(rand/N2) and then take mod N of that result.

I don't know why I said N2 provided an upper bound ...

3752
Math and Science / Re: Random Number question
« on: March 17, 2011, 04:17:02 am »
The N2 provides an upper bound for the random number because it is (mod N2).

3753
Math and Science / Re: Random Number question
« on: March 17, 2011, 04:10:10 am »
What is LCRNG? I can guess the RNG...

3754
Math and Science / Re: Random Number question
« on: March 17, 2011, 03:59:14 am »
Okay, so the way I come up with the original rand is by doing this:
Code: [Select]
ld b,2
Loop:
 ld a,r
 ld d,a
 ld a,r
 ld e,a
 add hl,de
 djnz Loop

3755
On accident, I did. But that was because I was working with divergent series/sums and coming up with an algorithm to find the equation to them. According to my profs I was meddling with the Riemann Zeta function and Riemann Hypothesis.

3756
I dunno, I've dabbled a little in the area of the Riemann Hypothesis and while it twists my brain into knots, I kind of feel like my brain can handle it. Maybe when it is solved we will take a look at it and realise that it was so much easier to prove than Fermat's Last Theorem :D Who knows?

3757
Math and Science / Re: Random Number question
« on: March 17, 2011, 03:28:00 am »
I just modified the code a little... Currently rand returns a "random" integer from 0 to 65535, but before  was doing (rand*(rand mod(5))) (mod 128) because that was much more random However, I just changed it to this:
(rand*(rand (mod n2))) (mod n)

And yes, I did do several trials :D Now, here are 12 trials, 6 with using L1 and L2:
.11
-.13
.11
.02
.009
.01

And 6 with L3,L2, and L1:
-.09
.02
-.01
.003
.14
-.03

(those are all r values)

3758
Math and Science / Re: Random Number question
« on: March 17, 2011, 03:01:03 am »
Okay, so the first round I get an r value of around .02, then when I work with L3, I get an r value of about .98

I take it that isn't very random?

3759
Math and Science / Re: Random Number question
« on: March 17, 2011, 01:53:49 am »
Okay, I'll give that a try :) Thanks!

3760
Math and Science / Random Number question
« on: March 17, 2011, 01:30:28 am »
Okay, so I made a routine in ReCode to generate a random integer and I wanted to test how random it is. Does anybody know of a way to do this? I am working on a mini game that uses a 4x4 grid and it initializes the game by selecting a random plot on the grid. I then got the idea to test how long it would take for it to randomly select each plot and then I wanted to test the "randomness" of certain routines. So that brings me to my question...

Anyway, here is a screenshot showing what I was talking about.

3761
Wait, this project plans to emulate a TI-8x? I thought we just wanted to maintain compatibility so that we could interact with it and because most of us here are familiar with ARM or Z80. I personally love the Z80 :D

So if we use a Z80 that is backwards compatible and KOS is made for this and the TI calcs, then that means we could start making assembly programs compatible on both platforms. The only issue would be directly playing with ports... KOS would need to make ROM calls that functioned differently to handle port reading/writing properly (but with the same address). Then we could start making KOS programs for the 83+/84+ that work on OTZ80.

3762
[OTcalc] Z80-Software / Re: OT Basic
« on: March 16, 2011, 09:53:17 pm »
There will definitely need to be a char() command so that users can have access to all of the ASCII characters and this will allow for something like this to concatenate strings (like on the 89):
Code: [Select]
"Hello "&"World"&char(33

3763
Site Feedback and Questions / Re: Site funding and maintenance
« on: March 16, 2011, 09:34:05 pm »
* Xeda112358 searches for this cafe press

EDIT:Ah, cool, I like that idea :D

3764
[OTcalc] Z80-Progress / Re: [OTZ80]2010 progress
« on: March 16, 2011, 05:16:28 pm »
As soon as I have exact specs on the hardware, and I mean exact, I can start on the OS.  I just need to make the emulator, then I can port the KnightKernel and start working on the OTCalc-specific code.
If I get specs on hardware as well as a programming environment to create the programming for this, I can start writing code for a OT-BASIC programming language :)

3765
[OTcalc] Z80-Software / Re: OT Basic
« on: March 16, 2011, 05:13:09 pm »
Actually, I have done some work with BCD math and floating point and to be honest, it isn't all that slow. However, I personally prefer making all of the math routines based on binary and then convert it to decimal only for display purposes.

Pages: 1 ... 249 250 [251] 252 253 ... 317