Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: subexpressions

Reply
Thread Tools

Re: subexpressions

 
 
Steve Howell
Guest
Posts: n/a
 
      06-02-2007
>
> 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/
 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      06-02-2007
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

 
Reply With Quote
 
 
 
 
Stef Mientki
Guest
Posts: n/a
 
      06-02-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sequence points in subexpressions amit.codename13@gmail.com C Programming 114 01-12-2010 10:01 PM
Re: subexpressions (OT: math) Steve Howell Python 23 06-04-2007 11:49 AM
subexpressions Sergey Dorofeev Python 20 06-04-2007 12:35 AM
Examples of using "reluctant" subexpressions in regexps? david.karr@wamu.net Java 4 04-27-2005 07:46 PM
pre_match and post_match for subexpressions trans. (T. Onoma) Ruby 0 10-24-2004 03:41 AM



Advertisments