Prev Next future_div_op.py Headings

@(@\newcommand{\B}[1]{{\bf #1}} \newcommand{\R}[1]{{\rm #1}}@)@
Future Division Operator: Example and Test
 
# Example using a_float ------------------------------------------------------
from __future__ import division
from pycppad import *
def pycppad_test_future_div_op() :
  x = 2.
  y = 3.
  #
  tmp1 = ad(x)
  tmp2 = ad(y)
  tmp3 = tmp1/tmp2
  tmp4 = x/tmp2
  tmp5 = tmp1/y

  assert tmp3 == x / y
  assert tmp4 == x / y
  assert tmp5 == x / y


Input File: example/future_div_op.py