I have problems using the hyperbolic functions sinh and cosh (MetaFun manual page 204) in metapost. A simple call of sinh (with valid parameter) ct:= sinh(3) ; gives ---------------------------------------- This is pdfeTeX, Version 3.141592-1.10b-2.1 (MiKTeX 2.3) ConTeXt ver: 2003.4.29 fmt: 2003.5.8 int: english mes: english ...
xx-2 ! Unknown relation will be considered false. <to be read again> : **->if(EXPR1)=2: (EXPR0)*(EXPR0)else:takepower(EXPR1)of(EXPR0)fi <to be read again> ) exp->begingroup((mexp256)**(EXPR2)) endgroup <to be read again> ; sinh->begingroup.save.xx;xx=exp.xx; (xx-1/xx)/2endgroup <to be read again> ; l.152 ct:= sinh(3) ;
? ---------------------------------------- Same error for cosh. The functions sin, cos and asinh, acosh work. Please, could somebody test, if this is a general problem... Greetings, Peter
At 15:09 17/05/2003 +0200, you wrote:
I have problems using the hyperbolic functions sinh and cosh (MetaFun manual page 204) in metapost. A simple call of sinh (with valid parameter)
ct:= sinh(3) ;
in mp-tool.mp, change: vardef sinh primary x = save xx ; xx = exp x ; (xx-1/xx)/2 enddef ; vardef cosh primary x = save xx ; xx = exp x ; (xx+1/xx)/2 enddef ; ^^^ (you need to run "texexec --make metafun") Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Sat, 17 May 2003 15:09:09 +0200
Peter Rolf
I have problems using the hyperbolic functions sinh and cosh (MetaFun manual page 204) in metapost. A simple call of sinh (with valid parameter)
ct:= sinh(3) ;
the following definition in mp-tool.mp vardef sinh primary x = save xx ; xx = exp xx ; (xx-1/xx)/2 enddef should be vardef sinh primary x = save xx ; xx = exp x ; (xx-1/xx)/2 enddef until Hans has fixed the problem you may use \startMPinclusions vardef sinh primary x = ((exp x) - ( exp (-x)))/2 enddef ; vardef cosh primary x = ((exp x) + ( exp (-x)))/2 enddef ; \stopMPinclusions or if you prefer Hans' math definitions \startMPinclusions vardef sinh primary x = save xx ; xx = exp x ; (xx-1/xx)/2 enddef ; vardef cosh primary x = save xx ; xx = exp x ; (xx+1/xx)/2 enddef ; \stopMPinclusions Jens
participants (3)
-
Hans Hagen
-
Jens-Uwe Morawski
-
Peter Rolf