Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Karima Shahzad
Thank you, but the issue is solved using different command


On Tue, Jul 28, 2020 at 2:27 PM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:

> One solution is to map the expression into
> polynomial expressions with variable 'a' and
> 'r' over the floating point numbers
>
> sage: a,r = SR.var('a,r');
> sage: expr = ((sqrt(2)*a-2*r)/(2+2*sqrt(2)))
> sage: RDF['a,r'](expr)
> 0.2928932188134525*a - 0.4142135623730951*r
>
> (this is not very robust as it would fail for something
> like cos(sqrt(2) + r))
>
> Vincent
>
> Le 28/07/2020 à 11:24, Bert Henry a écrit :
> >
> >
> > Am Dienstag, 28. Juli 2020 11:13:49 UTC+2 schrieb JJS137:
> >>
> >> Have you tried canonicalize_radical() ?
> >> Cheers,
> >> John
> >>
> >>
> > Yes, but it doesn't solve the problem
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/30d1f609-279f-4e76-8115-7959f381e536%40gmail.com
> .
>

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


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Bert Henry


Am Dienstag, 28. Juli 2020 10:17:20 UTC+2 schrieb Karima Shahzad:
>
> I am sorry, what is it?
>
>
> On Tue, Jul 28, 2020 at 11:12 AM Bert Henry  > wrote:
>
>> Sorry for writing uncomplete formula. Here it is better
>>
>> (sqrt(2)*a-2*r)/(2+2*sqrt(2))
>>
>> Thanks
>> Bert
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/adf5ef85-18a3-43bf-9248-c7cb9eb01efao%40googlegroups.com.


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Vincent Delecroix

One solution is to map the expression into
polynomial expressions with variable 'a' and
'r' over the floating point numbers

sage: a,r = SR.var('a,r');
sage: expr = ((sqrt(2)*a-2*r)/(2+2*sqrt(2)))
sage: RDF['a,r'](expr)
0.2928932188134525*a - 0.4142135623730951*r

(this is not very robust as it would fail for something
like cos(sqrt(2) + r))

Vincent

Le 28/07/2020 à 11:24, Bert Henry a écrit :



Am Dienstag, 28. Juli 2020 11:13:49 UTC+2 schrieb JJS137:


Have you tried canonicalize_radical() ?
Cheers,
John



Yes, but it doesn't solve the problem



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/30d1f609-279f-4e76-8115-7959f381e536%40gmail.com.


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Bert Henry


Am Dienstag, 28. Juli 2020 11:13:49 UTC+2 schrieb JJS137:
>
> Have you tried canonicalize_radical() ?
> Cheers,
> John
>
>
Yes, but it doesn't solve the problem 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/eedabef8-5f8f-4788-b30d-04d2cdce542bo%40googlegroups.com.


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Karima Shahzad
sudo update-alternatives --install /usr/bin/python python
/usr/bin/python3.7
The above command solved my problem, and I installed Sage successfully,
Thanks to your support team and special thanks to Dima Pasechnik.

On Tue, Jul 28, 2020 at 2:13 PM John Spitzer  wrote:

> Have you tried canonicalize_radical() ?
> Cheers,
> John
>
>
> On Tue, 28 Jul 2020 at 18:17, Karima Shahzad 
> wrote:
>
>> I am sorry, what is it?
>>
>>
>> On Tue, Jul 28, 2020 at 11:12 AM Bert Henry  wrote:
>>
>>> Sorry for writing uncomplete formula. Here it is better
>>>
>>> (sqrt(2)*a-2*r)/(2+2*sqrt(2))
>>>
>>> Thanks
>>> Bert
>>>
>>> Am Montag, 27. Juli 2020 20:28:14 UTC+2 schrieb Bert Henry:

 How can I get from

 2(2​+1)2​a−a​


 the numerical term

 0.2929a - 0.4142r

 Thanks in advance
 Bert

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sage-support+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/sage-support/5d3e501e-4d7b-4c7c-a501-ed08c3d80bd8o%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/CADp1E_pMTuLujb8JZDW2yXz1zwkUVKu244CpwOdsbNogbMeFxA%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> John Spitzer
> Independent  Researcher Emeritus
>
> PO Box 211
> Elsternwick 3185
> Victoria
> Australia
>
> P +61 3 9528 6775
> M +61 478 634 239 
>
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CABNZosHHRhn_LkVVaHpzQ%2BM%2BR2hYh5Zs-mB0MWjjCdR3sR0aEg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CADp1E_ofSWdd_WDaKA6kLeoSJjyVZ7%2Boxh%2BiqgNxjG4LoKwC%2Bw%40mail.gmail.com.


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread John Spitzer
Have you tried canonicalize_radical() ?
Cheers,
John


On Tue, 28 Jul 2020 at 18:17, Karima Shahzad 
wrote:

> I am sorry, what is it?
>
>
> On Tue, Jul 28, 2020 at 11:12 AM Bert Henry  wrote:
>
>> Sorry for writing uncomplete formula. Here it is better
>>
>> (sqrt(2)*a-2*r)/(2+2*sqrt(2))
>>
>> Thanks
>> Bert
>>
>> Am Montag, 27. Juli 2020 20:28:14 UTC+2 schrieb Bert Henry:
>>>
>>> How can I get from
>>>
>>> 2(2​+1)2​a−a​
>>>
>>>
>>> the numerical term
>>>
>>> 0.2929a - 0.4142r
>>>
>>> Thanks in advance
>>> Bert
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/5d3e501e-4d7b-4c7c-a501-ed08c3d80bd8o%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/CADp1E_pMTuLujb8JZDW2yXz1zwkUVKu244CpwOdsbNogbMeFxA%40mail.gmail.com
> 
> .
>


-- 
John Spitzer
Independent  Researcher Emeritus

PO Box 211
Elsternwick 3185
Victoria
Australia

P +61 3 9528 6775
M +61 478 634 239 



-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CABNZosHHRhn_LkVVaHpzQ%2BM%2BR2hYh5Zs-mB0MWjjCdR3sR0aEg%40mail.gmail.com.


Re: [sage-support] Re: numerical simplification

2020-07-28 Thread Karima Shahzad
I am sorry, what is it?


On Tue, Jul 28, 2020 at 11:12 AM Bert Henry  wrote:

> Sorry for writing uncomplete formula. Here it is better
>
> (sqrt(2)*a-2*r)/(2+2*sqrt(2))
>
> Thanks
> Bert
>
> Am Montag, 27. Juli 2020 20:28:14 UTC+2 schrieb Bert Henry:
>>
>> How can I get from
>>
>> 2(2​+1)2​a−a​
>>
>>
>> the numerical term
>>
>> 0.2929a - 0.4142r
>>
>> Thanks in advance
>> Bert
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/5d3e501e-4d7b-4c7c-a501-ed08c3d80bd8o%40googlegroups.com
> 
> .
>

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


[sage-support] Re: numerical simplification

2020-07-28 Thread Bert Henry
Sorry for writing uncomplete formula. Here it is better

(sqrt(2)*a-2*r)/(2+2*sqrt(2))

Thanks
Bert

Am Montag, 27. Juli 2020 20:28:14 UTC+2 schrieb Bert Henry:
>
> How can I get from
>
> 2(2​+1)2​a−a​
>
>
> the numerical term
>
> 0.2929a - 0.4142r
>
> Thanks in advance
> Bert
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5d3e501e-4d7b-4c7c-a501-ed08c3d80bd8o%40googlegroups.com.