Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to put in a wobble in a calculation
Message
 
To
17/10/2006 06:47:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01162413
Message ID:
01162469
Views:
20
Hi Hilmar

>>>If I understand correctly, what about something like yourresult=yourresult*(0.95 + (0.1*rand(-1))). This will give you a result which is max ±5% from the correct answer.
>>
>>I have multiple calculations so, does all of them have to have RAND(-1)?
>
>rand(-1) should be called first, one time only. This will start the randomizer, based on the system time.
>
>After that, if you calculate several times, just use rand().

Thanks, I have made the changes accordignly. Any suggestion to make it deviate ±2.5%. That is do I have to change 0.95 to 0.975 only or even 0.1 needs to be modified?
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform