[sage-support] Re: numeric approximations for symbolic expressions

2008-10-11 Thread Burcin Erocal

On Fri, 10 Oct 2008 17:48:57 -0500
Jason Grout [EMAIL PROTECTED] wrote:

 
 Burcin Erocal wrote:
  On Fri, 10 Oct 2008 10:35:16 -0500
  Jason Grout [EMAIL PROTECTED] wrote:
  
  The general request still stands, though: is there a way to
  numerically approximate all the constants in a symbolic expression,
  but keep the variables as variables?
  
  The pynac based symbolics code does the following:
  
  sage: x,y,z = var(x y z, ns=1)
  sage: t = 1 + sqrt(2)*x + sin(x)
  sage: t.n()
  sin(x) + (1.4142135623730951)*x + 1.0
  
  This is with the bundle at #3872 and patches at #4244 applied, and
  the package at #4243.
 
 
 Is there any chance this could be merged into 3.1.3 to get wider 
 testing?  That is, if it's a purely optional framework.  Barring
 that, is there a chance we could get a single huge patch that
 consolidates all of this, or even just a single patch that contains
 the changes in the bundle?

Since 3.1.3 is almost out the door, and these tickets have not been
reviewed yet, they won't be in 3.1.3. I've been told they are high
priority for 3.2, so hopefully they will be in the first alpha.

I have some fixes I haven't pushed to trac yet. I will try to set up a
canonical location where you can get the latest version of my tree.
This might be tomorrow afternoon though.


Cheers,

Burcin

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: latex of acos

2008-10-11 Thread pragma


thank you :)


On Oct 7, 6:23 pm, Håkan Granath [EMAIL PROTECTED] wrote:
 On Oct 1, 4:21 pm, pragma [EMAIL PROTECTED] wrote:



  ive tried this but it doesnt seem to do the job:

  class c_arccos(sage.calculus.calculus.Function_arccos):
      def __init__(self):
          pass
      def _latex_(self):
          return \\arccos

  p_arccos = c_arccos()

  print latex(p_arccos(1/3))
  print latex(p_arccos)

  #
  #outputs:
  

  \cos^{-1} \left( \frac{1}{3} \right)
  \arccos

  the first line still outputs \cos^{-1} instead ofarccos

 This seems to work:

 sage: sage.calculus.calculus.Function_arccos._latex_ = lambda self : \
 \arccos
 sage: latex(arccos(1/3))
 \arccos \left( \frac{1}{3} \right)

 Best,

 /Håkan
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---