flat assembler
Message board for the users of flat assembler.

Index > Heap > Is sinx+cosx=sqrt(1+sin(2x))

Author
Thread Post new topic Reply to topic
prostyle4444



Joined: 28 Jun 2013
Posts: 22
Location: Bootsector
prostyle4444
I know this is a basic question. But i am curious about this function. Is this function correct?
Code:
 
sinx + cosx = 
sqrt(sinx + cosx)^2 = 
sqrt(1 + sin(2x)) 
(by using function 
(sinx + cosx)^2 =  
(1 + sin(2x)) ).
    
Post 27 Jul 2014, 16:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
The sqrt function has both positive and negative roots so you need to be careful to state which root you are referring to. For example at x=pi you need to take the negative root, whereas at x=0 you need to take the positive root.
Post 27 Jul 2014, 18:26
View user's profile Send private message Visit poster's website Reply with quote
Dr F



Joined: 01 Apr 2014
Posts: 239
Location: Berehove, Ukraine
Dr F
stupid
Post 27 Jul 2014, 20:19
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
prostyle4444, a little clarification may be helpful here. In algebra, the sqrt function is assumed to include both the positive and negative values. So by convention, "sqrt(x)" means "+/-sqrt(x)" i.e. "plus or minus the sqrt of x". Sometimes an equation needs to be limited to only positive or only negative values, in which case the sign will be specified i.e. +sqrt(x) or -sqrt(x). However that is not the case with your equation, so what you've written is 100% correct Cool

_________________
FAMOS - the first memory operating system
Post 27 Jul 2014, 23:44
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.