Author Topic: Random Real Number Generator  (Read 699 times)

0 Members and 1 Guest are viewing this topic.

Offline BlueDeviL

  • ASM Supporter
  • *
  • Posts: 5
Random Real Number Generator
« on: 2012-08-05 11:44:40 »
Hello;
I have prepared a small Random Real Number Generator. It is not perfect but gives an idea. Simply it generates an integer and make some stuff with the number PI 8) (constant e also usable)

I attached the code. Any comments and critics are welcome. Report any bug, problem etc.
*the source code i attached is a radasm project ;)

Offline Homer

  • ObjAsm32 Developer
  • Community Staff
  • ASM Fanatic
  • *****
  • Posts: 4617
  • Country: au
Re: Random Real Number Generator
« Reply #1 on: 2012-08-06 06:00:26 »
Ah, based on rdtsc I see.. nice, useful for some things if you don't need/want it to be deterministic (repeatable and predictable for a given initial seed).
Always nice to see some code get posted, keep up the good work :)
In C++, friends have access to your private members.
In ObjAsm, your members are exposed!

Offline BlueDeviL

  • ASM Supporter
  • *
  • Posts: 5
Re: Random Real Number Generator
« Reply #2 on: 2012-08-06 21:11:03 »
@Homer, thanks for your comment. I'll upload new codes when i have time to create new samples 8)