- #1
brandy
- 161
- 0
so i found this program MATLAB on the computers at uni. I've been messing around with it. right now I am learning a bit about floating point systems and stuff and i thought it would be cool to write up a function that finds the smallest and largest numbers but turns out its harder than i first thought.
smallest was easy(er)
1*beta^m and I ignore the significant figures hehe, any ideas on how i fix that?
largest is hard. because i can't ignore them k's :S
will something like this work? I am not actually on MATLAB atm so i can't test myself haha.
u = 0.5*beta^(1-k)
c=[0:k-1];
result = sum((beta-1)*beta^M / beta^c)
oi and what's with the realmin realmax stuff, could i actually use that instead?
smallest was easy(er)
1*beta^m and I ignore the significant figures hehe, any ideas on how i fix that?
largest is hard. because i can't ignore them k's :S
will something like this work? I am not actually on MATLAB atm so i can't test myself haha.
u = 0.5*beta^(1-k)
c=[0:k-1];
result = sum((beta-1)*beta^M / beta^c)
oi and what's with the realmin realmax stuff, could i actually use that instead?