#
# canola - canon canola 1614p emulator
# Copyright (C) 2011 Peter Miller
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see .
#
; ---------- Card-Pocket-Begin -------------------------------------------
; Title: MS-13: cosh(x)
; Color: green
; Style: blank
; ---------- Card-Pocket-End ---------------------------------------------
;
; http://en.wikipedia.org/wiki/Hyperbolic_function
;
; cosh(x) = sigma((x**(2n))/((2n)!)
; = 1 + (x**2)/(2!) + (x**4)/(4!) + (x**6)/(6!) + ...
;
; M14 => x**2
; M13 => series sum
; M12 => factorial denominator
;
SFJ $214
*
+=
SM14 ; x**2
1
SM13 ; series sum
SM12
CS
FJ $311
*
RM14
/
RM12
-=
1
M12 ; bump factorial denominator
RV
/
RM12
+=
M13 ; add to series sum
1
M12 ; bump factorial denominator
RV
CS
MJ $311
RM13 ; series sum
SRJ