1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Numerically stable forms

  1. Aug 22, 2004 #1

    I have an assignment lying around, in which I have to find numerically stable forms of some expressions. A few still elude me, so I was wondering if someone might have a suggestion.


    This has large rounding errors if x is close to 1

    sinh (x) - tanh (x)

    Large errors for x close to 0


    No idea...
    Last edited: Aug 22, 2004
  2. jcsd
  3. Aug 22, 2004 #2


    User Avatar
    Staff Emeritus
    Science Advisor

  4. Aug 22, 2004 #3
    Yes, a Taylor expansion does seem obvious; but alas, the'yre asking analytical forms...
  5. Aug 23, 2004 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed


    Use a similar trick for 1, by noting [tex]sinh(y)=\frac{e^{y}-e^{-y}}{2}[/tex]
    Last edited: Aug 23, 2004
  6. Aug 23, 2004 #5
    Thanks! This is just what I needed!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook