Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab and floating point, function for min n max?

  1. Aug 18, 2011 #1
    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?
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted