Re: subexpressions

Discussion in 'Python' started by Steve Howell, Jun 2, 2007.

  1. Steve Howell

    Steve Howell Guest

    >
    > def f(x): y = x*x; return sin(y)+cos(y);
    >


    Although I know valid trigonometry is not the point of
    this exercise, I'm still trying to figure out why
    anybody would ever take the square of an angle.
    What's the square root of pi/4 radians?







    ____________________________________________________________________________________
    Looking for earth-friendly autos?
    Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
    http://autos.yahoo.com/green_center/
     
    Steve Howell, Jun 2, 2007
    #1
    1. Advertising

  2. On Sat, 02 Jun 2007 05:54:51 -0700, Steve Howell wrote:

    >>
    >> def f(x): y = x*x; return sin(y)+cos(y);
    >>

    >
    > Although I know valid trigonometry is not the point of
    > this exercise, I'm still trying to figure out why
    > anybody would ever take the square of an angle.
    > What's the square root of pi/4 radians?


    Approximately 0.886 radians. It corresponds to the angle of a point on the
    unit circle quite close to (sqrt(2/5), sqrt(3/5)), or if you prefer
    decimal approximations, (0.632, 0.775).

    Angles are real numbers (in the maths sense), so sqrt(pi/4) radians is
    just as reasonable an angle as pi/4 radians. Both are irrational numbers
    (that is, can't be written exactly as the ratio of two integers).



    --
    Steven
     
    Steven D'Aprano, Jun 2, 2007
    #2
    1. Advertising

  3. Steve Howell

    Stef Mientki Guest

    Steve Howell wrote:
    >> def f(x): y = x*x; return sin(y)+cos(y);
    >>

    >
    > Although I know valid trigonometry is not the point of
    > this exercise, I'm still trying to figure out why
    > anybody would ever take the square of an angle.
    > What's the square root of pi/4 radians?

    Maybe he meant
    sin(x)^2 + cos(x)^2
    which is well known demodulation technique if you create two signals 90 degrees out of phase.

    Stef
     
    Stef Mientki, Jun 2, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    572
  2. Sergey Dorofeev

    subexpressions

    Sergey Dorofeev, Jun 1, 2007, in forum: Python
    Replies:
    20
    Views:
    664
    Alex Martelli
    Jun 4, 2007
  3. Steve Howell

    Re: subexpressions (OT: math)

    Steve Howell, Jun 2, 2007, in forum: Python
    Replies:
    23
    Views:
    622
    Wildemar Wildenburger
    Jun 4, 2007
  4. sequence points in subexpressions

    , Dec 13, 2009, in forum: C Programming
    Replies:
    114
    Views:
    2,137
    Tim Rentsch
    Jan 12, 2010
  5. trans.  (T. Onoma)

    pre_match and post_match for subexpressions

    trans. (T. Onoma), Oct 24, 2004, in forum: Ruby
    Replies:
    0
    Views:
    104
    trans. (T. Onoma)
    Oct 24, 2004
Loading...

Share This Page