brandy
Aug18-11, 09:56 AM
so i found this program matlab on the computers at uni. ive been messing around with it. right now im 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 cant ignore them k's :S
will something like this work? im not actually on matlab atm so i cant test myself haha.
u = 0.5*beta^(1-k)
c=[0:k-1];
result = sum((beta-1)*beta^M / beta^c)
oi and whats 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 cant ignore them k's :S
will something like this work? im not actually on matlab atm so i cant test myself haha.
u = 0.5*beta^(1-k)
c=[0:k-1];
result = sum((beta-1)*beta^M / beta^c)
oi and whats with the realmin realmax stuff, could i actually use that instead?