Holderbert
New member
- Joined
- Sep 16, 2016
- Messages
- 2
Hey there,
So i have been working on this problem but i can't seem to figure it out.
[FONT="]e - h/100[/FONT]
[FONT="] ---------[/FONT]
[FONT="] e - h
[/FONT]e is a big number, but it doesn't really matter what it is (it's 2^52)
h is a random number between 0 and e-1 inclusive
A.) What i want is if h is halfway through its range(h*0.5) the outcome to be 2 but instead it gives me (e-h*0.5/100)/(e-0.5*h)=1.99. Same goes for h if its 1/4 thorugh its range for example. I get 1.33 when i want it to be1+1/3.
It basically goes from being 0 off when h is at its minimum 0 to being 1% off when h is at its maximum.
What would i have to change on the formula above for it not to be off by a factor from 0-1%?
B.)What would i have to do to get a formula which is always 2% off and doesn't scale like the one 1 have?
E.g. In this case i'd want the result to be 1.96 for h*0.5 and 1.306667 for h*0.25
Feel free to ask me if something is unclear.
Holderbert
So i have been working on this problem but i can't seem to figure it out.
[FONT="]e - h/100[/FONT]
[FONT="] ---------[/FONT]
[FONT="] e - h
[/FONT]e is a big number, but it doesn't really matter what it is (it's 2^52)
h is a random number between 0 and e-1 inclusive
A.) What i want is if h is halfway through its range(h*0.5) the outcome to be 2 but instead it gives me (e-h*0.5/100)/(e-0.5*h)=1.99. Same goes for h if its 1/4 thorugh its range for example. I get 1.33 when i want it to be1+1/3.
It basically goes from being 0 off when h is at its minimum 0 to being 1% off when h is at its maximum.
What would i have to change on the formula above for it not to be off by a factor from 0-1%?
B.)What would i have to do to get a formula which is always 2% off and doesn't scale like the one 1 have?
E.g. In this case i'd want the result to be 1.96 for h*0.5 and 1.306667 for h*0.25
Feel free to ask me if something is unclear.
Holderbert