It should probably be made to work with floating point half integers. Half
integers are exactly representable as floats, so it isn't an issue.

Aaron Meurer

On Wed, Aug 26, 2020 at 12:15 PM Che Liu <cli...@berkeley.edu> wrote:

> Thank you for the help!
>
> On Wednesday, August 26, 2020 at 11:02:24 AM UTC-7 Naman Nimmo wrote:
>
>> Hi!
>>
>> You can pass in a `Rational`.
>>
>> ```
>> >>> a = WignerD(Rational(1, 2), Rational(1, 2), Rational(1, 2), pi, pi/2,
>> 0)
>> >>> a.doit()
>> -sqrt(2)*I/2
>>
>>
>> ```
>>
>> On Wed, Aug 26, 2020 at 11:17 PM Che Liu <cli...@berkeley.edu> wrote:
>>
>>> Hi,
>>>
>>> Seems like WignerD.doit would error for half integer spin.
>>> If you run
>>> [image: Capture.PNG]
>>> with j = 1/2,
>>> then an exception is raised in the doit() function:
>>> [image: Capture.PNG]
>>> The problem rests in the m_values function. For your reference:[image:
>>> Capture.PNG]
>>> Line 56 gives 2.0 for j==1/2, and its is_Integer attribute is false.
>>>
>>> The same problem occurs for
>>> [image: Capture.PNG]
>>> but not for
>>> [image: Capture.PNG]
>>> Any ways to get around it?
>>> My sympy version is 1.6.2, and I run these on a Windows system.
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sympy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sympy+un...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sympy/c3aa6eac-fc9c-4b2e-bd8c-e539bcb3dfa4n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/sympy/c3aa6eac-fc9c-4b2e-bd8c-e539bcb3dfa4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/991a481a-e2bc-45a0-a20b-a840b748d5a2n%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/991a481a-e2bc-45a0-a20b-a840b748d5a2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KDN6-rKroi2VK%3D6xyvM3zWRZUZg4bXzt%2Bp%3Dpo7_ObMtg%40mail.gmail.com.

Reply via email to