aesthete-team team mailing list archive
-
aesthete-team team
-
Mailing list archive
-
Message #00037
Re: mpmath related diffs
>
> There's cot, cosec (and their inverses), and all the hyperbolic versions
> of the standard trigonometric functions. They're all in mpmath. There may
> be other trig functions (most notably sinc) we could add.
>
> Ah yes, they should all fit neatly into trig_function style XML files, I
guess.
I see there's some recognition of log - does that need a XML file?
There is a bit of a hacky backend python list that names a couple of
auto-bracketing functions, but being consistent in using XML rather than
that is likely a better plan. It dates from pre-XML days.
What about the square root function - I notice sqrt works, but do we need
> an XML for that one too? (I guess that's a unicode symbol, yeah?) Of course
> if we type sqrt we probably _do_ want the brackets, unless that gets
> converted to the correct symbol on the fly.
>
Alt+s will give a square root (it's a bit tricky for writing in XML due to
the overbar and continual scaling so is defined in the python code), but if
it's renamed to 'sqrt' from 'square_root', then anyone entering "s q r t
Ctrl+(" will see the text morph into a root symbol. At present it works if
you do "$ s q u a r e _ r o o t Ctrl+(" ($ allowing verbatim entry to
circumvent that pesky underscore)
> If you want to expand Ctrl+( to send aesthete into function detection (you
> may have already done so!), it could also be used for exponentiation...
>
> Yep, actually that predates the XML - you get a name/argument target
phrase pair. The name goes green if it matches a sympy or library function
(testing it through one of those Dynamic functions, can't remember which).
Multiple arguments can be comma-separated.
Have a look at
http://www.philtweir.co.uk/aesthete/wiki/pmwiki.php?n=Documentation.AestheteSympyTutorial#toc25
As we've overridden the sin function, try 'z e t a' instead. You can even
define your own :)
http://www.philtweir.co.uk/aesthete/wiki/pmwiki.php?n=Documentation.AestheteSympyTutorial#toc20
However, as noted before, this only really works optimally for functions
where we want permanent brackets and an ASCII name such as, I suppose,
'apart',
P
References