ó
¡¼™\c           @   sÝ  d  Z  d d l m Z m Z m Z m Z m Z m Z m Z m	 Z	 m
 Z
 d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d	 l m Z d d
 l m Z m Z d d l m Z e d ƒ Z e d ƒ Z  e d ƒ Z! e d ƒ Z" e d ƒ Z# e d ƒ Z$ d e f d „  ƒ  YZ% d e f d „  ƒ  YZ& d „  Z' d e f d „  ƒ  YZ( d e f d „  ƒ  YZ) d e f d „  ƒ  YZ* d e f d „  ƒ  YZ+ d e f d  „  ƒ  YZ, d! e f d" „  ƒ  YZ- d# e f d$ „  ƒ  YZ. d% e f d& „  ƒ  YZ/ e/ ƒ  Z0 d' „  Z1 e1 d( ƒ Z2 dN d) „ Z4 d* „  Z5 d+ „  Z6 dN dN d, „ Z7 dN dN d- „ Z8 dN d. „ Z9 dN dN d/ „ Z: dN dN d0 „ Z; dN d1 „ Z< d2 e f d3 „  ƒ  YZ= d4 e f d5 „  ƒ  YZ> d6 e f d7 „  ƒ  YZ? d8 e? f d9 „  ƒ  YZ@ d: e? f d; „  ƒ  YZA d< e? f d= „  ƒ  YZB d> e? f d? „  ƒ  YZC d@ e? f dA „  ƒ  YZD dB e@ f dC „  ƒ  YZE dD e f dE „  ƒ  YZF dF eF f dG „  ƒ  YZG dH eF f dI „  ƒ  YZH dJ e e f dK „  ƒ  YZI dL e e f dM „  ƒ  YZJ dN S(O   s¬   
AST nodes specific to Fortran.

The functions defined in this module allows the user to express functions such as ``dsign``
as a SymPy function for symbolic manipulation.
iÿÿÿÿ(	   t	   Attributet	   CodeBlockt   FunctionCallt   Nodet   nonet   Stringt   Tokent	   _mk_Tuplet   Variable(   t   Basic(   t   string_types(   t   Tuple(   t   Expr(   t   Function(   t   Floatt   Integer(   t   sympify(   t   truet   false(   t   iterablet   puret	   elementalt	   intent_int
   intent_outt   intent_inoutt   allocatablet   Programc           B   s/   e  Z d  Z d d g Z e Z e d „  ƒ Z RS(   sm   Represents a 'program' block in Fortran

    Examples
    ========

    >>> from sympy.codegen.ast import Print
    >>> from sympy.codegen.fnodes import Program
    >>> prog = Program('myprogram', [Print([42])])
    >>> from sympy.printing import fcode
    >>> print(fcode(prog, source_format='free'))
    program myprogram
        print *, 42
    end program
    t   namet   bodyc         C   s
   t  |  Œ  S(   N(   R   (   R   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt   <lambda>2   t    (   t   __name__t
   __module__t   __doc__t	   __slots__R   t   _construct_namet   staticmethodt   _construct_body(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   !   s   t
   use_renamec           B   s&   e  Z d  Z d d g Z e Z e Z RS(   sÑ   Represents a renaming in a use statement in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import use_rename, use
    >>> from sympy.printing import fcode
    >>> ren = use_rename("thingy", "convolution2d")
    >>> print(fcode(ren, source_format='free'))
    thingy => convolution2d
    >>> full = use('signallib', only=['snr', ren])
    >>> print(fcode(full, source_format='free'))
    use signallib, only: snr, thingy => convolution2d
    t   localt   original(   R   R    R!   R"   R   t   _construct_localt   _construct_original(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR&   5   s   c         C   s$   t  |  d ƒ r |  j St |  ƒ Sd  S(   NR   (   t   hasattrR   R   (   t   arg(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt   _nameH   s    t   usec           B   s[   e  Z d  Z d d d g Z i e d 6e d 6Z e e ƒ Z e d „  ƒ Z	 e d „  ƒ Z
 RS(   sØ   Represents a use statement in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import use
    >>> from sympy.printing import fcode
    >>> fcode(use('signallib'), source_format='free')
    'use signallib'
    >>> fcode(use('signallib', [('metric', 'snr')]), source_format='free')
    'use signallib, metric => snr'
    >>> fcode(use('signallib', only=['snr', 'convolution2d']), source_format='free')
    'use signallib, only: snr, convolution2d'
    t	   namespacet   renamet   onlyc         C   s8   t  g  |  D]' } t | t ƒ r% | n	 t | Œ  ^ q
 Œ  S(   N(   R   t
   isinstanceR&   (   t   argsR,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   `   R   c         C   s8   t  g  |  D]' } t | t ƒ r% | n	 t | ƒ ^ q
 Œ  S(   N(   R   R2   R&   R-   (   R3   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   a   R   (   R   R    R!   R"   R   t   defaultsR$   R-   t   _construct_namespacet   _construct_renamet   _construct_only(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR.   N   s   t   Modulec           B   sQ   e  Z d  Z d d d g Z i e ƒ  d 6Z e Z e d „  ƒ Z	 e d „  ƒ Z
 RS(   sd   Represents a module in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import Module
    >>> from sympy.printing import fcode
    >>> print(fcode(Module('signallib', ['implicit none'], []), source_format='free'))
    module signallib
    implicit none
    <BLANKLINE>
    contains
    <BLANKLINE>
    <BLANKLINE>
    end module

    R   t   declarationst   definitionsc         C   s
   t  |  Œ  S(   N(   R   (   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   y   R   c         C   s
   t  |  Œ  S(   N(   R   (   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   z   R   (   R   R    R!   R"   R   R4   R   R#   R$   t   _construct_declarationst   _construct_definitions(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR8   d   s   t
   Subroutinec           B   sD   e  Z d  Z d d d d g Z e Z e d „  ƒ Z e d „  ƒ Z	 RS(   s
   Represents a subroutine in Fortran

    Examples
    ========

    >>> from sympy import symbols
    >>> from sympy.codegen.ast import Print
    >>> from sympy.codegen.fnodes import Subroutine
    >>> from sympy.printing import fcode
    >>> x, y = symbols('x y', real=True)
    >>> sub = Subroutine('mysub', [x, y], [Print([x**2 + y**2, x*y])])
    >>> print(fcode(sub, source_format='free', standard=2003))
    subroutine mysub(x, y)
    real*8 :: x
    real*8 :: y
    print *, x**2 + y**2, x*y
    end subroutine
    R   t
   parametersR   t   attrsc         C   s   t  t t j |  ƒ Œ  S(   N(   R   t   mapR   t   deduced(   t   params(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   ’   R   c         C   s!   t  | t ƒ r | St | Œ  Sd  S(   N(   R2   R   (   t   clst   itr(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR%   ”   s    (
   R   R    R!   R"   R   R#   R$   t   _construct_parameterst   classmethodR%   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR=   }   s
   t   SubroutineCallc           B   s2   e  Z d  Z d d g Z e e ƒ Z e e ƒ Z RS(   s   Represents a call to a subroutine in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import SubroutineCall
    >>> from sympy.printing import fcode
    >>> fcode(SubroutineCall('mysub', 'x y'.split()))
    '       call mysub(x, y)'
    R   t   subroutine_args(	   R   R    R!   R"   R$   R-   R#   R   t   _construct_subroutine_args(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRG   ›   s   
t   Doc           B   sŽ   e  Z d  Z d d d d d d g Z i e d ƒ d 6e d 6Z e d „  ƒ Z e e	 ƒ Z
 e e	 ƒ Z e e	 ƒ Z e e	 ƒ Z e d	 „  ƒ Z RS(
   s¯   Represents a Do loop in in Fortran

    Examples
    ========

    >>> from sympy import symbols
    >>> from sympy.codegen.ast import aug_assign, Print
    >>> from sympy.codegen.fnodes import Do
    >>> from sympy.printing import fcode
    >>> i, n = symbols('i n', integer=True)
    >>> r = symbols('r', real=True)
    >>> body = [aug_assign(r, '+', 1/i), Print([i, r])]
    >>> do1 = Do(body, i, 1, n)
    >>> print(fcode(do1, source_format='free'))
    do i = 1, n
        r = r + 1d0/i
        print *, i, r
    end do
    >>> do2 = Do(body, i, 1, n, 2)
    >>> print(fcode(do2, source_format='free'))
    do i = 1, n, 2
        r = r + 1d0/i
        print *, i, r
    end do
    R   t   countert   firstt   lastt   stept
   concurrenti   c         C   s
   t  |  Œ  S(   N(   R   (   R   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   È   R   c         C   s   |  r
 t  St S(   N(   R   R   (   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   Í   R   (   R   R    R!   R"   R   R   R4   R$   R%   R   t   _construct_countert   _construct_firstt   _construct_lastt   _construct_stept   _construct_concurrent(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRJ   «   s   t   ArrayConstructorc           B   s#   e  Z d  Z d g Z e e ƒ Z RS(   s\   Represents an array constructor

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.fnodes import ArrayConstructor
    >>> ac = ArrayConstructor([1, 2, 3])
    >>> fcode(ac, standard=95, source_format='free')
    '(/1, 2, 3/)'
    >>> fcode(ac, standard=2003, source_format='free')
    '[1, 2, 3]'

    t   elements(   R   R    R!   R"   R$   R   t   _construct_elements(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRU   Ð   s   	t   ImpliedDoLoopc           B   sr   e  Z d  Z d d d d d g Z i e d ƒ d 6Z e e ƒ Z e e ƒ Z	 e e ƒ Z
 e e ƒ Z e e ƒ Z RS(   sÈ   Represents an implied do loop in Fortran

    Examples
    ========

    >>> from sympy import Symbol, fcode
    >>> from sympy.codegen.fnodes import ImpliedDoLoop, ArrayConstructor
    >>> i = Symbol('i', integer=True)
    >>> idl = ImpliedDoLoop(i**3, i, -3, 3, 2)  # -27, -1, 1, 27
    >>> ac = ArrayConstructor([-28, idl, 28]) # -28, -27, -1, 1, 27, 28
    >>> fcode(ac, standard=2003, source_format='free')
    '[-28, (i**3, i = -3, 3, 2), 28]'

    t   exprRK   RL   RM   RN   i   (   R   R    R!   R"   R   R4   R$   R   t   _construct_exprRP   RQ   RR   RS   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRX   ã   s   t   Extentc           B   s    e  Z d  Z d „  Z d „  Z RS(   sL   Represents a dimension extent.

    Examples
    ========

    >>> from sympy.codegen.fnodes import Extent
    >>> e = Extent(-3, 3)  # -3, -2, -1, 0, 1, 2, 3
    >>> from sympy.printing import fcode
    >>> fcode(e, source_format='free')
    '-3:3'
    >>> from sympy.codegen.ast import Variable, real
    >>> from sympy.codegen.fnodes import dimension, intent_out
    >>> dim = dimension(e, e)
    >>> arr = Variable('x', real, attrs=[dim, intent_out])
    >>> fcode(arr.as_Declaration(), source_format='free', standard=2003)
    'real*8, dimension(-3:3, -3:3), intent(out) :: x'

    c         G   sŽ   t  | ƒ d k r= | \ } } t j |  t | ƒ t | ƒ ƒ St  | ƒ d k sq t  | ƒ d k r~ | d d k r~ t j |  ƒ St d ƒ ‚ d  S(   Ni   i    i   t   :s5   Expected 0 or 2 args (or one argument == None or ':')(   R\   N(   t   lenR	   t   __new__R   t   Nonet
   ValueError(   RC   R3   t   lowt   high(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR^     s    4c         C   s$   t  |  j ƒ d k r d Sd |  j S(   Ni    R\   s   %d:%d(   R]   R3   (   t   selft   printer(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt	   _sympystr  s    (   R   R    R!   R^   Re   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR[   û   s   		c          G   sþ   t  |  ƒ d k r! t d ƒ ‚ n  g  } x¦ |  D]ž } t | t ƒ rS | j | ƒ q. t | t ƒ r— | d k r | j t ƒ  ƒ qÌ | j t | ƒ ƒ q. t | ƒ r¹ | j t | Œ  ƒ q. | j t | ƒ ƒ q. Wt  |  ƒ d k rñ t d ƒ ‚ n  t	 d | ƒ S(   s   Creates a 'dimension' Attribute with (up to 7) extents.

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.fnodes import dimension, intent_in
    >>> dim = dimension('2', ':')  # 2 rows, runtime determined number of columns
    >>> from sympy.codegen.ast import Variable, integer
    >>> arr = Variable('a', integer, attrs=[dim, intent_in])
    >>> fcode(arr.as_Declaration(), source_format='free', standard=2003)
    'integer*4, dimension(2, :), intent(in) :: a'

    i   s0   Fortran only supports up to 7 dimensional arraysR\   i    s   Need at least one dimensiont	   dimension(
   R]   R`   R2   R[   t   appendR
   R   R   R   R    (   R3   R>   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRf     s     t   *c         K   s$  t  | t ƒ r@ t | j ƒ d k rL t d t | ƒ ƒ ‚ qL n t | Œ  } t | j d g  ƒ ƒ | g } | d	 k	 r¾ | t	 t
 t f k r® i t	 d 6t
 d 6t d 6| } n  | j | ƒ n  | j d d	 ƒ } | j d d	 ƒ } | d	 k rt j |  d | d | ƒSt |  | d | d | ƒSd	 S(
   só   Convenience function for creating a Variable instance for a Fortran array

    Parameters
    ==========

    symbol : symbol
    dim : Attribute or iterable
        If dim is an ``Attribute`` it need to have the name 'dimension'. If it is
        not an ``Attribute``, then it is passsed to :func:`dimension` as ``*dim``
    intent : str
        One of: 'in', 'out', 'inout' or None
    \*\*kwargs:
        Keyword arguments for ``Variable`` ('type' & 'value')

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.ast import integer, real
    >>> from sympy.codegen.fnodes import array
    >>> arr = array('a', '*', 'in', type=integer)
    >>> print(fcode(arr.as_Declaration(), source_format='free', standard=2003))
    integer*4, dimension(*), intent(in) :: a
    >>> x = array('x', [3, ':', ':'], intent='out', type=real)
    >>> print(fcode(x.as_Declaration(value=1), source_format='free', standard=2003))
    real*8, dimension(3, :, :), intent(out) :: x = 1
    Rf   s/   Got an unexpected Attribute argument as dim: %sR?   t   int   outt   inoutt   valuet   typeN(   R2   R    t   strR   R`   Rf   t   listt   popR_   R   R   R   Rg   R   RA   (   t   symbolt   dimt   intentt   kwargsR?   Rl   t   type_(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt   arrayD  s    "c         C   s#   t  |  t ƒ r t |  ƒ St |  ƒ S(   N(   R2   R
   R   R   (   R,   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt
   _printabler  s    c         C   s   t  d t |  ƒ g ƒ S(   s    Creates an AST node for a function call to Fortran's "allocated(...)"

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.fnodes import allocated
    >>> alloc = allocated('x')
    >>> fcode(alloc, source_format='free')
    'allocated(x)'
    t	   allocated(   R   Rw   (   Rv   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRx   v  s    c         C   sH   t  d t |  ƒ g | r' t | ƒ g n g  | r@ t | ƒ g n g  ƒ S(   sx   Creates an AST node for a function call to Fortran's "lbound(...)"

    Parameters
    ==========

    array : Symbol or String
    dim : expr
    kind : expr

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.fnodes import lbound
    >>> lb = lbound('arr', dim=2)
    >>> fcode(lb, source_format='free')
    'lbound(arr, 2)'
    t   lbound(   R   Rw   (   Rv   Rr   t   kind(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRy   …  s    %c         C   sH   t  d t |  ƒ g | r' t | ƒ g n g  | r@ t | ƒ g n g  ƒ S(   Nt   ubound(   R   Rw   (   Rv   Rr   Rz   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR{      s    %c         C   s/   t  d t |  ƒ g | r' t | ƒ g n g  ƒ S(   sZ   Creates an AST node for a function call to Fortran's "shape(...)"

    Parameters
    ==========

    source : Symbol or String
    kind : expr

    Examples
    ========

    >>> from sympy.printing import fcode
    >>> from sympy.codegen.fnodes import shape
    >>> shp = shape('x')
    >>> fcode(shp, source_format='free')
    'shape(x)'
    t   shape(   R   Rw   (   t   sourceRz   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR|   ©  s    c         C   sH   t  d t |  ƒ g | r' t | ƒ g n g  | r@ t | ƒ g n g  ƒ S(   s±   Creates an AST node for a function call to Fortran's "size(...)"

    Examples
    ========

    >>> from sympy import Symbol
    >>> from sympy.printing import fcode
    >>> from sympy.codegen.ast import FunctionDefinition, real, Return, Variable
    >>> from sympy.codegen.fnodes import array, sum_, size
    >>> a = Symbol('a', real=True)
    >>> body = [Return((sum_(a**2)/size(a))**.5)]
    >>> arr = array(a, dim=[':'], intent='in')
    >>> fd = FunctionDefinition(real, 'rms', [arr], body)
    >>> print(fcode(fd, source_format='free', standard=2003))
    real*8 function rms(a)
    real*8, dimension(:), intent(in) :: a
    rms = sqrt(sum(a**2)*1d0/size(a))
    end function

    t   size(   R   Rw   (   Rv   Rr   Rz   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR~   Â  s    %c         C   sQ   t  d t |  ƒ t | ƒ g | r0 t | ƒ g n g  | rI t | ƒ g n g  ƒ S(   s    Creates an AST node for a function call to Fortran's "reshape(...)"

    Parameters
    ==========

    source : Symbol or String
    shape : ArrayExpr
    t   reshape(   R   Rw   (   R}   R|   t   padt   order(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR   ß  s    	.c         C   s"   t  d |  r t |  ƒ g n g  ƒ S(   s*   Creates an Attribute ``bind_C`` with a name

    Parameters
    ==========

    name : str

    Examples
    ========

    >>> from sympy import Symbol
    >>> from sympy.printing import fcode
    >>> from sympy.codegen.ast import FunctionDefinition, real, Return, Variable
    >>> from sympy.codegen.fnodes import array, sum_, size, bind_C
    >>> a = Symbol('a', real=True)
    >>> s = Symbol('s', integer=True)
    >>> arr = array(a, dim=[s], intent='in')
    >>> body = [Return((sum_(a**2)/s)**.5)]
    >>> fd = FunctionDefinition(real, 'rms', [arr, s], body, attrs=[bind_C('rms')])
    >>> print(fcode(fd, source_format='free', standard=2003))
    real*8 function rms(a, s) bind(C, name="rms")
    real*8, dimension(s), intent(in) :: a
    integer*4 :: s
    rms = sqrt(sum(a**2)/s)
    end function
    t   bind_C(   R    R   (   R   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR‚   ð  s    t   GoToc           B   s?   e  Z d  Z d d g Z i e d 6Z e e ƒ Z e e	 ƒ Z
 RS(   s   Represents a goto statement in Fortran

    Examples
    ========

    >>> from sympy.codegen.fnodes import GoTo
    >>> go = GoTo([10, 20, 30], 'i')
    >>> from sympy.printing import fcode
    >>> fcode(go, source_format='free')
    'go to (10, 20, 30), i'
    t   labelsRY   (   R   R    R!   R"   R   R4   R$   R   t   _construct_labelsR   RZ   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRƒ     s
   t   FortranReturnc           B   s0   e  Z d  Z d g Z i e d 6Z e e ƒ Z RS(   s2   AST node explicitly mapped to a fortran "return".

    Because a return statement in fortran is different from C, and
    in order to aid reuse of our codegen ASTs the ordinary
    ``.codegen.ast.Return`` is interpreted as assignment to
    the result variable of the function. If one for some reason needs
    to generate a fortran RETURN statement, this node should be used.

    Examples
    ========

    >>> from sympy.codegen.fnodes import FortranReturn
    >>> from sympy.printing import fcode
    >>> fcode(FortranReturn('x'))
    '       return x'
    t   return_value(	   R   R    R!   R"   R   R4   R$   R   t   _construct_return_value(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR†     s   	t	   FFunctionc           B   s   e  Z d  Z d „  Z RS(   iM   c         C   sf   |  j  j } | j d |  j k  r> t d | |  j f ƒ ‚ n  d j | d j t | j |  j	 ƒ ƒ ƒ S(   Nt   standards   %s requires Fortran %d or newers   {0}({1})s   , (
   t	   __class__R   t	   _settingst   _required_standardt   NotImplementedErrort   formatt   joinR@   t   _printR3   (   Rc   Rd   R   (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt   _fcode8  s
    (   R   R    R   R’   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR‰   5  s   t   F95Functionc           B   s   e  Z d  Z RS(   i_   (   R   R    R   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR“   @  s   t   isignc           B   s   e  Z d  Z d Z RS(   s/    Fortran sign intrinsic for integer arguments. i   (   R   R    R!   t   nargs(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR”   D  s   t   dsignc           B   s   e  Z d  Z d Z RS(   s8    Fortran sign intrinsic for double precision arguments. i   (   R   R    R!   R•   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR–   I  s   t   cmplxc           B   s   e  Z d  Z d Z RS(   s&    Fortran complex conversion function. i   (   R   R    R!   R•   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR—   N  s   Rz   c           B   s   e  Z d  Z d Z RS(   s    Fortran kind function. i   (   R   R    R!   R•   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyRz   S  s   t   mergec           B   s   e  Z d  Z d Z RS(   s    Fortran merge function i   (   R   R    R!   R•   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR˜   X  s   t   _literalc           B   s   e  Z d Z d Z d  „  Z RS(   c         O   s’   d j  |  j ƒ |  j d ƒ \ } } | j d ƒ j d ƒ } | d | d j d ƒ } } | d k rm d n | } | p| d |  j | | p d S(	   Ns   %.{0}et   et   0t   .i    i   t   +R   (   R   t	   _decimalst   splitt   stript   rstript   lstript   _token(   Rc   Rd   R3   Rt   t   mantissat   sgnd_ext   ex_sgnt   ex_num(    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR’   a  s
    %N(   R   R    R_   R£   Rž   R’   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR™   ]  s   t
   literal_spc           B   s   e  Z d  Z d Z d Z RS(   s'    Fortran single precision real literal Rš   i	   (   R   R    R!   R£   Rž   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR¨   i  s   t
   literal_dpc           B   s   e  Z d  Z d Z d Z RS(   s'    Fortran double precision real literal t   di   (   R   R    R!   R£   Rž   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR©   o  s   t   sum_c           B   sC   e  Z d  d d g Z i e d 6e d 6Z e e ƒ Z e e ƒ Z RS(   Rv   Rr   t   mask(	   R   R    R"   R   R4   R$   R   t   _construct_arrayt   _construct_dim(    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR«   u  s   t   product_c           B   sC   e  Z d  d d g Z i e d 6e d 6Z e e ƒ Z e e ƒ Z RS(   Rv   Rr   R¬   (	   R   R    R"   R   R4   R$   R   R­   R®   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyR¯   |  s   N(K   R!   t   sympy.codegen.astR    R   R   R   R   R   R   R   R   t   sympy.core.basicR	   t   sympy.core.compatibilityR
   t   sympy.core.containersR   t   sympy.core.exprR   t   sympy.core.functionR   t   sympy.core.numbersR   R   t   sympy.core.sympifyR   t   sympy.logicR   R   t   sympy.utilities.iterablesR   R   R   R   R   R   R   R   R&   R-   R.   R8   R=   RG   RJ   RU   RX   R[   t   assumed_extentRf   t   assumed_sizeR_   Rv   Rw   Rx   Ry   R{   R|   R~   R   R‚   Rƒ   R†   R‰   R“   R”   R–   R—   Rz   R˜   R™   R¨   R©   R«   R¯   (    (    (    s3   lib/python2.7/site-packages/sympy/codegen/fnodes.pyt   <module>   sj   @	%!		#.			