Suppose that I have an expression
e = x**2+sqrt(a**2*b**2)
What is the best way to assign to expression assumption that all variables
are Positive, so that equivalent of e is x**2+ab?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe fro
On Thu, Dec 4, 2014 at 7:38 AM, Paul Royik wrote:
> Suppose that I have an expression
>
> e = x**2+sqrt(a**2*b**2)
> What is the best way to assign to expression assumption that all variables
> are Positive, so that equivalent of e is x**2+ab?
It should be done like this:
In [11]: refine(e, Q.po
I know this way, but is there any way to change this after symbol creation?
On Thursday, December 4, 2014 6:29:27 PM UTC+2, Ondřej Čertík wrote:
>
> On Thu, Dec 4, 2014 at 7:38 AM, Paul Royik > wrote:
> > Suppose that I have an expression
> >
> > e = x**2+sqrt(a**2*b**2)
> > What is the best
On Thu, Dec 4, 2014 at 10:25 AM, Paul Royik wrote:
> I know this way, but is there any way to change this after symbol creation?
The right way in my opinion is to just create a symbol with no
assumptions and then use refine(). As I wrote below, it doesn't yet
work for this case, but it will in t
newvars =symbols('x a b', integer=True)
e.xreplace(dict(zip([x,a,b], newvars)))
I did not test this.
--
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...@
They need to be positive. Even for integer x, sqrt(x**2) != x if x is negative.
Aaron Meurer
On Fri, Dec 5, 2014 at 3:34 PM, Francesco Bonazzi
wrote:
> newvars =symbols('x a b', integer=True)
> e.xreplace(dict(zip([x,a,b], newvars)))
>
> I did not test this.
>
> --
> You received this message be
You are heading into erroneous waters.
It doesn't matter that 3>0. sqrt(9) has two values, +3 and -3.
Just because some other systems make this mistake does not mean
sympy should do this.
If you want to say something about the choice of branch for sqrt(x^2),
you have to say something about sqrt(
Sorry I mistyped.
--
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 post to this group, send email to sympy@googlegroups.com.
Visit
Hi Richard,
I do get your point that we don't have to make the same mistake with other
systems, but I do think there is a benefit for consistency, if they have a
purpose in doing that design. For most systems, sqrt() returns the
principal/positive square root, so there is only one unique value.
Hi Richard,
On Fri, Dec 5, 2014 at 4:48 PM, Richard Fateman wrote:
> You are heading into erroneous waters.
> It doesn't matter that 3>0. sqrt(9) has two values, +3 and -3.
> Just because some other systems make this mistake does not mean
> sympy should do this.
>
> If you want to say something
Something that I'm not sure about with representing functions as
multivalued is, how do you represent arbitrary Riemann surfaces.
Another question is computational. How do you compute the surfaces in
general (say even for a limited class of expressions, like algebraic
functions), and how do you ma
Am 06.12.2014 um 17:03 schrieb Yuxiang Wang:
Hi Richard,
I do get your point that we don't have to make the same mistake with other
systems, but I do think there is a benefit for consistency, if they have a
purpose in doing that design. For most systems, sqrt() returns the
principal/positive squ
On Sat, Dec 6, 2014 at 1:01 PM, Aaron Meurer wrote:
> Something that I'm not sure about with representing functions as
> multivalued is, how do you represent arbitrary Riemann surfaces.
>
> Another question is computational. How do you compute the surfaces in
> general (say even for a limited clas
Hi Joachim,
I was thinking of Mathematica and MATLAB Symbolic Toolbox, and both doing
symbolic math rather than numerical systems. My experience is limited to
these two though (that's the two my institution got a license for), so I'd
be open to hear on more example / counter-examples.
-Shawn
Am 07.12.2014 um 04:41 schrieb Yuxiang Wang:
Hi Joachim,
I was thinking of Mathematica and MATLAB Symbolic Toolbox, and both doing
symbolic math rather than numerical systems.
Ah okay, then my hunch was wrong. Good to know.
> My experience is limited to
these two though (that's the two my in
Am 07.12.2014 um 01:30 schrieb Ondřej Čertík:
However, then, when you subtract this, you need to write this as:
log(a*b) - log(a) - log(b) = 2*pi*I*n
Wouldn't you need to write
> log(a*b) = log(a) + log(b)
as
> log(a*b) = log(a) + log(b) + 2*pi*I*n
as well?
I think there is probably a wa
Am 06.12.2014 um 21:01 schrieb Aaron Meurer:
Something that I'm not sure about with representing functions as
multivalued is, how do you represent arbitrary Riemann surfaces.
Another question is computational. How do you compute the surfaces in
general (say even for a limited class of expression
1994 paper by Adam Dingle and Richard Fateman
Branch Cuts in Computer Algebra, (ISSAC '94 proceedings. also search
online).
When you say things about sqrt(), does it generalize to cuberoot? If it
does not, you are in trouble, or will be down the road.
What is the principal value of (1)^(1/6)
Am 11.12.2014 um 00:40 schrieb Richard Fateman:
1994 paper by Adam Dingle and Richard Fateman
Branch Cuts in Computer Algebra, (ISSAC '94 proceedings. also search
online).
That paper assumes that everything can be refactored to logarithms plus
arithmetic.
Does that assumption hold? I could im
On Thursday, December 11, 2014 8:16:09 AM UTC-8, Joachim Durchholz wrote:
>
> Am 11.12.2014 um 00:40 schrieb Richard Fateman:
> > 1994 paper by Adam Dingle and Richard Fateman
> > Branch Cuts in Computer Algebra, (ISSAC '94 proceedings. also search
> > online).
>
> That paper assumes that ev
On Friday, December 12, 2014 9:27:11 PM UTC-8, Richard Fateman wrote:
>
>
>
> On Thursday, December 11, 2014 8:16:09 AM UTC-8, Joachim Durchholz wrote:
>>
>> Am 11.12.2014 um 00:40 schrieb Richard Fateman:
>> > 1994 paper by Adam Dingle and Richard Fateman
>> > Branch Cuts in Computer Algebra,
Am 13.12.2014 um 06:27 schrieb Richard Fateman:
On Thursday, December 11, 2014 8:16:09 AM UTC-8, Joachim Durchholz wrote:
Am 11.12.2014 um 00:40 schrieb Richard Fateman:
1994 paper by Adam Dingle and Richard Fateman
Branch Cuts in Computer Algebra, (ISSAC '94 proceedings. also search
online)
You might want to take a look at the book by Garret Sobczyk
New Foundations in Mathematics
The Geometric Concept of Number
Birkhauser
On 12/13/2014 09:08 AM, Joachim Durchholz wrote:
Am 13.12.2014 um 06:27 schrieb Richard Fateman:
On Thursday, December 11, 2014 8:16:09 AM UTC-8, Joachim Du
Am 13.12.2014 um 15:27 schrieb Alan Bromborsky:
You might want to take a look at the book by Garret Sobczyk
New Foundations in Mathematics
The Geometric Concept of Number
Birkhauser
That's an interesting book for sure, though I'll probably lack the time
to study it myself.
I'm not sure how t
On Saturday, December 13, 2014 6:08:58 AM UTC-8, Joachim Durchholz wrote:
>
> Am 13.12.2014 um 06:27 schrieb Richard Fateman:
> >
> > On Thursday, December 11, 2014 8:16:09 AM UTC-8, Joachim Durchholz
> wrote:
> >>
> >> Am 11.12.2014 um 00:40 schrieb Richard Fateman:
> >>> 1994 paper by Ada
On Saturday, December 6, 2014 10:01:38 PM UTC+2, Aaron Meurer wrote:
>
> Something that I'm not sure about with representing functions as
> multivalued is, how do you represent arbitrary Riemann surfaces.
>
A practical way of representing a Riemann surface is by means of coordinate
functions a
Am 16.12.2014 um 01:52 schrieb Richard Fateman:
On Saturday, December 13, 2014 6:08:58 AM UTC-8, Joachim Durchholz wrote:
But that wasn't my point anyway. I was thinking about calculating for
all principal roots in parallel, and not choosing at all until it turns
out that some choice is incons
On 12/13/2014 10:23 AM, Joachim Durchholz wrote:
Am 13.12.2014 um 15:27 schrieb Alan Bromborsky:
You might want to take a look at the book by Garret Sobczyk
New Foundations in Mathematics
The Geometric Concept of Number
Birkhauser
That's an interesting book for sure, though I'll probably lac
28 matches
Mail list logo