ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jens-Uwe Morawski <morawski@gmx.net>
Subject: Re: hyperbolic funtions in MP
Date: Sat, 17 May 2003 19:53:46 +0200	[thread overview]
Message-ID: <20030517195346.0f09787d.morawski@gmx.net> (raw)
In-Reply-To: <3EC63475.5010407@arcor.de>

On Sat, 17 May 2003 15:09:09 +0200
Peter Rolf <peter.rolf@arcor.de> 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) ;
> 

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

      parent reply	other threads:[~2003-05-17 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-17 13:09 Peter Rolf
2003-05-17 15:17 ` Hans Hagen
2003-05-17 17:53 ` Jens-Uwe Morawski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030517195346.0f09787d.morawski@gmx.net \
    --to=morawski@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).