%% 
%% This is file `trig.sty', generated 
%% on <1993/11/17> with the docstrip utility (2.0r).
%% 
%% The original source files were:
%% 
%% trig.doc 
%% 
%% Do not distribute the stripped version of this file. 
%% The checksum in the header refers to the documented version. 
%% 
%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "David Carlisle",
%%%     version         = "1.04",
%%%     date            = "06 October 1993,
%%%     time            = "14:10:17 BST,
%%%     filename        = "trig.sty",
%%%     address         = "Computer Science Department
%%%                        Manchester University
%%%                        Oxford Road
%%%                        Manchester
%%%                        England
%%%                        M13 9PL",
%%%     telephone       = "+44 61 275 6139",
%%%     FAX             = "+44 61 275 6236",
%%%     checksum        = "38008 334 1249 11378",
%%%     email           = "carlisle@cs.man.ac.uk (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "LaTeX, trig",
%%%     supported       = "yes",
%%%     docstring       = "
%%%
%%%     trig.sty
%%%
%%%     A LaTeX style option implementing the trigonometric functions
%%%     sin cos tan
%%%
%%%     Documentation requires Mittelbach's doc.sty.
%%%
%%%     The checksum field above was produced by
%%%     Robert Solovay's checksum utility.",
%%%  }
%%% ====================================================================


\chardef\@xc=90
\chardef\@clxx=180
\chardef\@lxxi=71
\mathchardef\@mmmmlxviii=4068
\chardef\@coeffz=72
\chardef\@coefb=42
\mathchardef\@coefc=840
\mathchardef\@coefd=5040
{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}}
\def\TG@rem@pt#1{\expandafter\noPT\the#1\space}
\def\TG@term#1{%
 \dimen@\@tempb\dimen@
 \advance\dimen@ #1\p@}
\def\TG@series{%
 \dimen@\@lxxi\dimen@
 \divide \dimen@ \@mmmmlxviii
 \edef\@tempa{\TG@rem@pt\dimen@}%
 \dimen@\@tempa\dimen@
 \edef\@tempb{\TG@rem@pt\dimen@}%
 \divide\dimen@\@coeffz
 \advance\dimen@\m@ne\p@
 \TG@term\@coefb
 \TG@term{-\@coefc}%
 \TG@term\@coefd
 \dimen@\@tempa\dimen@
 \divide\dimen@ \@coefd}
\def\CalculateSin#1{%
  \expandafter\ifx\csname sin(\number#1)\endcsname\relax
    \dimen@=#1\p@\TG@@sin
    \expandafter\edef\csname sin(\number#1)\endcsname
                                    {\TG@rem@pt\dimen@}%
  \fi}
\def\CalculateCos#1{%
  \expandafter\ifx\csname cos(\number#1)\endcsname\relax
    \dimen@=\@xc\p@
    \advance\dimen@-#1\p@
    \TG@@sin
    \expandafter\edef\csname cos(\number#1)\endcsname
                                     {\TG@rem@pt\dimen@}%
  \fi}
\def\TG@reduce#1#2{%
\dimen@#1#2\@xc\p@
  \advance\dimen@#2-\@clxx\p@
  \dimen@-\dimen@
  \TG@@sin}
\def\TG@@sin{%
  \ifdim\TG@reduce>+%
  \else\ifdim\TG@reduce<-%
  \else\TG@series\fi\fi}%
\def\UseSin#1{\csname sin(\number#1)\endcsname}
\def\UseCos#1{\csname cos(\number#1)\endcsname}
\chardef\z@num\z@
\expandafter\let\csname sin(0)\endcsname\z@num
\expandafter\let\csname cos(0)\endcsname\@ne
\expandafter\let\csname sin(90)\endcsname\@ne
\expandafter\let\csname cos(90)\endcsname\z@num
\expandafter\let\csname sin(-90)\endcsname\m@ne
\expandafter\let\csname cos(-90)\endcsname\z@num
\expandafter\let\csname sin(180)\endcsname\z@num
\expandafter\let\csname cos(180)\endcsname\m@ne
\expandafter\let\csname sin(-180)\endcsname\z@num
\expandafter\let\csname cos(-180)\endcsname\m@ne
\expandafter\let\csname sin(270)\endcsname\m@ne
\expandafter\let\csname cos(270)\endcsname\z@num
\expandafter\let\csname sin(-270)\endcsname\@ne
\expandafter\let\csname cos(-270)\endcsname\z@num
\def\CalculateTan#1{
  \expandafter\ifx\csname tan(\number#1)\endcsname\relax
    \CalculateSin{#1}%
    \CalculateCos{#1}%
    \dimen@\UseCos{#1}\p@
    \count@\dimen@
    \divide\count@\@iv
    \dimen@=\UseSin{#1}\p@
    \dimen@=\two@fourteen\dimen@
    \divide\dimen@\count@
    \expandafter\edef\csname tan(\number#1)\endcsname
                                        {\TG@rem@pt\dimen@}%
  \fi}
\def\UseTan#1{\csname tan(#1)\endcsname}
\mathchardef\two@fourteen=16384
\chardef\@iv=4
\expandafter\def\csname tan(90)\endcsname{\errmessage{Infinite tan !}}
\expandafter\def\csname tan(-90)\endcsname{\errmessage{Infinite tan !}}
\endinput
%% 
%% End of file `trig.sty'.
