[PATCH] Added arcsine specific values

0 views
Skip to first unread message

Jack

unread,
Mar 27, 2011, 11:13:50 PM3/27/11
to sympy, Jack McCaffery
---
.../elementary/tests/test_trigonometric.py | 8 +++++++-
sympy/functions/elementary/trigonometric.py | 16 ++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/sympy/functions/elementary/tests/test_trigonometric.py b/sympy/functions/elementary/tests/test_trigonometric.py
index 37b05c0..ade2aca 100644
--- a/sympy/functions/elementary/tests/test_trigonometric.py
+++ b/sympy/functions/elementary/tests/test_trigonometric.py
@@ -266,9 +266,15 @@ def test_asin():
assert asin(-oo) == I*oo

assert asin(0) == 0
- assert asin(Rational(1,2)) == pi/6
assert asin(1) == pi/2
assert asin(sqrt(3)/2) == pi/3
+ assert asin(sqrt(2)/2) == pi/4
+ assert asin(sqrt((5-sqrt(5))/8)) == pi/5
+ assert asin(Rational(1,2)) == pi/6
+ assert asin((sqrt(2-sqrt(2)))/2) == pi/8
+ assert asin((sqrt(5)-1)/4) == pi/10
+ assert asin((sqrt(3)-1)/sqrt(2**3)) == pi/12
+

assert asin(x).diff(x) == 1/sqrt(1-x**2)

diff --git a/sympy/functions/elementary/trigonometric.py b/sympy/functions/elementary/trigonometric.py
index 9b39016..5c4c1b9 100644
--- a/sympy/functions/elementary/trigonometric.py
+++ b/sympy/functions/elementary/trigonometric.py
@@ -801,14 +801,22 @@ def eval(cls, arg):

if arg.is_number:
cst_table = {
- S.Half : 6,
- -S.Half : -6,
+ sqrt(3)/2 : 3,
+ -sqrt(3)/2 : -3,
sqrt(2)/2 : 4,
-sqrt(2)/2 : -4,
1/sqrt(2) : 4,
-1/sqrt(2) : -4,
- sqrt(3)/2 : 3,
- -sqrt(3)/2 : -3,
+ sqrt((5-sqrt(5))/8) : 5,
+ -sqrt((5-sqrt(5))/8) : -5,
+ S.Half : 6,
+ -S.Half : -6,
+ sqrt(2-sqrt(2))/2 : 8,
+ -sqrt(2-sqrt(2))/2 : -8,
+ (sqrt(5)-1)/4 : 10,
+ (1-sqrt(5))/4 : -10,
+ (sqrt(3)-1)/sqrt(2**3) : 12,
+ (1-sqrt(3))/sqrt(2**3) : -12,
}

if arg in cst_table:
--
1.7.0.4

Aaron S. Meurer

unread,
Mar 28, 2011, 5:47:36 PM3/28/11
to sympy-...@googlegroups.com, Jack McCaffery
I don't have time to review this now, but have added a link to it on an issue (http://code.google.com/p/sympy/issues/detail?id=2243) so it doesn't get forgotten.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups "sympy-patches" group.
> To post to this group, send email to sympy-...@googlegroups.com.
> To unsubscribe from this group, send email to sympy-patche...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.
>

Aaron S. Meurer

unread,
Mar 29, 2011, 1:14:33 AM3/29/11
to Jack McCaffery, sympy-...@googlegroups.com
Ah, so you are a GSoC student.  I wasn't sure if you were.  In that case, it would be better if you made your patch into a pull request in GitHub.

If you need git help, ask on IRC (#sympy on freenode).

Aaron Meurer

On Mar 28, 2011, at 11:12 PM, Jack McCaffery wrote:

Thanks. I just thought I'd let you know that I've uploaded a GSoC proposal to the wiki and this is the patch I'm trying to submit for acceptance. It's not much so I thought it might be easy to put through. Any input you have on my application would be greatly appreciated if you have a few minutes to look at it (https://github.com/sympy/sympy/wiki/GSOC-2011,-Jack-McCaffery,-Improved-Series).

Thanks,
Jack McCaffery
--
Jack McCaffery
Graduate Student
ICS, University of Louisiana

Alexey U. Gudchenko

unread,
Mar 29, 2011, 5:07:50 AM3/29/11
to sympy-...@googlegroups.com, Jack
28.03.2011 07:13, Jack пишет:

I have observed that you begin your wiki page about series.

First of all, I rename the title, according to:

> Let's use this convention. Title the page like "GSoC 2011
Application Your Name".

http://groups.google.com/group/sympy/browse_thread/thread/3184d64aefba96c9/b153564852e2e3d1?hl=en

Also, to prevent of disorientation about current situation in series,
please take into account these pages about it:
https://github.com/sympy/sympy/wiki/Function-expansions-and-series
https://github.com/sympy/sympy/wiki/Function-expansions-and-series-2

--
Alexey U.

Jack McCaffery

unread,
Apr 2, 2011, 3:48:28 PM4/2/11
to Aaron S. Meurer, sympy-...@googlegroups.com
Hi,

I'm having a little trouble making a pull request. I'm new to git and am following the guide:


which has been very helpful, but I'm getting the following error: 

sudo git push github 2243_arc_values
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Is this a common error that someone recognizes?

Jack McCaffery

Vinzent Steinberg

unread,
Apr 2, 2011, 3:50:30 PM4/2/11
to sympy-...@googlegroups.com
2011/4/2 Jack McCaffery <jpmcc...@gmail.com>:

> Hi,
> I'm having a little trouble making a pull request. I'm new to git and am
> following the guide:
> https://github.com/sympy/sympy/wiki/Development-workflow
> which has been very helpful, but I'm getting the following error:
> sudo git push github 2243_arc_values
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly
> Is this a common error that someone recognizes?

Did you upload your ssh key to github?

Vinzent

Jack McCaffery

unread,
Apr 2, 2011, 4:19:03 PM4/2/11
to sympy-...@googlegroups.com
probably not, I'll look into that.


--
You received this message because you are subscribed to the Google Groups "sympy-patches" group.
To post to this group, send email to sympy-...@googlegroups.com.
To unsubscribe from this group, send email to sympy-patche...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.

Reply all
Reply to author
Forward
0 new messages