[sage-support] Re: Maxima Solve sys
JSmath is basically a bunch of javacript routines that takes latex created from sage and displays in the html file. The html is generated in my Python script(server,html). When I call JSmath the first routine is loaded. In the first script it calls another and this is where the problem occurs. One of the problems is that I am calling the JSmath from a server. It is a path problem. I can insert images in the html file. On Sep 2, 11:10 am, Robert Bradshaw rober...@math.washington.edu wrote: On Wed, 2 Sep 2009, Mikie wrote: Didn't you create the API using the notebook? Yes, I created the simple server, but you can think of that more as reaching under the html/javascript/jsmath layer and exposing the raw computatinal elements themsleves, rather than building on top of that nice GUI. - Robert On Sep 1, 10:02 pm, Robert Bradshaw rober...@math.washington.edu wrote: On Sep 1, 2009, at 12:16 PM, Mikie wrote: I took out the eval and for some reason it is working. Robert, this is function in my API (AlgCalc) http://pirsqrt.com:1843/ If I would give it to you would you show me how to get JSmath to work? I have talked to you before. You said you were too busy. I have loaded load.js, but when it goes for another .js file it cannot find. You're probably thinking about another Robert--I don't know anything about jsmath. What I would do is look for instructions on their site. - Robert (Bradshaw) On Sep 1, 12:37 pm, Mikie thephantom6...@hotmail.com wrote: Yes, Robert eval is doing the rounding. How do I fix it? On Sep 1, 12:31 pm, Mikie thephantom6...@hotmail.com wrote: I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
Didn't you create the API using the notebook? On Sep 1, 10:02 pm, Robert Bradshaw rober...@math.washington.edu wrote: On Sep 1, 2009, at 12:16 PM, Mikie wrote: I took out the eval and for some reason it is working. Robert, this is function in my API (AlgCalc) http://pirsqrt.com:1843/ If I would give it to you would you show me how to get JSmath to work? I have talked to you before. You said you were too busy. I have loaded load.js, but when it goes for another .js file it cannot find. You're probably thinking about another Robert--I don't know anything about jsmath. What I would do is look for instructions on their site. - Robert (Bradshaw) On Sep 1, 12:37 pm, Mikie thephantom6...@hotmail.com wrote: Yes, Robert eval is doing the rounding. How do I fix it? On Sep 1, 12:31 pm, Mikie thephantom6...@hotmail.com wrote: I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
On Wed, 2 Sep 2009, Mikie wrote: Didn't you create the API using the notebook? Yes, I created the simple server, but you can think of that more as reaching under the html/javascript/jsmath layer and exposing the raw computatinal elements themsleves, rather than building on top of that nice GUI. - Robert On Sep 1, 10:02 pm, Robert Bradshaw rober...@math.washington.edu wrote: On Sep 1, 2009, at 12:16 PM, Mikie wrote: I took out the eval and for some reason it is working. Robert, this is function in my API (AlgCalc) http://pirsqrt.com:1843/ If I would give it to you would you show me how to get JSmath to work? I have talked to you before. You said you were too busy. I have loaded load.js, but when it goes for another .js file it cannot find. You're probably thinking about another Robert--I don't know anything about jsmath. What I would do is look for instructions on their site. - Robert (Bradshaw) On Sep 1, 12:37 pm, Mikie thephantom6...@hotmail.com wrote: Yes, Robert eval is doing the rounding. How do I fix it? On Sep 1, 12:31 pm, Mikie thephantom6...@hotmail.com wrote: I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. - Robert --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Is it possible to fix it? Can you post a complete example (with the equations you are using and the call to MSolveSys) that we can paste into our sage session to see this problem? Thanks, Jason -- Jason Grout --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
I took out the eval and for some reason it is working. Robert, this is function in my API (AlgCalc) http://pirsqrt.com:1843/ If I would give it to you would you show me how to get JSmath to work? I have talked to you before. You said you were too busy. I have loaded load.js, but when it goes for another .js file it cannot find. On Sep 1, 12:37 pm, Mikie thephantom6...@hotmail.com wrote: Yes, Robert eval is doing the rounding. How do I fix it? On Sep 1, 12:31 pm, Mikie thephantom6...@hotmail.com wrote: I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Maxima Solve sys
On Sep 1, 2009, at 12:16 PM, Mikie wrote: I took out the eval and for some reason it is working. Robert, this is function in my API (AlgCalc) http://pirsqrt.com:1843/ If I would give it to you would you show me how to get JSmath to work? I have talked to you before. You said you were too busy. I have loaded load.js, but when it goes for another .js file it cannot find. You're probably thinking about another Robert--I don't know anything about jsmath. What I would do is look for instructions on their site. - Robert (Bradshaw) On Sep 1, 12:37 pm, Mikie thephantom6...@hotmail.com wrote: Yes, Robert eval is doing the rounding. How do I fix it? On Sep 1, 12:31 pm, Mikie thephantom6...@hotmail.com wrote: I have tried SR. I get a malformed value. Yes, I understand the problem with eval. Do you have any suggestions on how to get the right value into maxima.solve? On Sep 1, 11:32 am, Robert Bradshaw rober...@math.washington.edu wrote: On Tue, 1 Sep 2009, Mikie wrote: When I run the server with the function above and the following string from a text box I get [y=-1,x=0]. The string is [3*x-y-1,x+(1/3)*y] It is changing the input value to [3*x-y-1,x] 1/3 = 0 in Python. Also, I hope you realize how dangerous eval(random string someone gave you from the web) is! - Robert On Sep 1, 10:38 am, Mikie thephantom6...@hotmail.com wrote: Sorry, wrong function def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(eqns) return solns On Sep 1, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: On Sep 1, 2009, at 9:17 AM, Mikie wrote: Here is function I am using to solve systems of linear equations. def MSolveSys(syss): eqns=eval(syss) solns=maxima.solve(syss) return solns Works great in the notebook, but when I put it in a Python script it rounds the coeficients of the variables and thus produces bad solutions. Perhaps eval here is the culprit. You might have to parse it a bit yourself. SR(...) will parse expressions. Mikie effectively isn't using eval, right? That line (and the eqns variable) is not being used. Jason -- Jason Grout- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---