# This file was generated by exp2python.  You probably don't want to edit
# it since your modifications will be lost if exp2python is used to
# regenerate it.
import sys

from SCL.SCLBase import *
from SCL.SimpleDataTypes import *
from SCL.ConstructedDataTypes import *
from SCL.AggregationDataTypes import *
from SCL.TypeChecker import check_type
from SCL.Builtin import *
from SCL.Rules import *

schema_name = 'test_function'

schema_scope = sys.modules[__name__]


####################
 # ENTITY dummy #
####################
class dummy(BaseEntityClass):
	'''Entity dummy definition.
	'''
	# This class does not define any attribute.
	pass

####################
 # FUNCTION add #
####################
def add(r1,r2,):
	'''
	:param r1
	:type r1:REAL
	:param r2
	:type r2:REAL
	'''
	result = r1  +  r2
	return result

####################
 # FUNCTION pow_n #
####################
def pow_n(r1,n,):
	'''
	:param r1
	:type r1:REAL
	:param n
	:type n:INTEGER
	'''
	if (n  ==  0):
		return 1
	else:
		result = r1
		for  i in range(1,n,1):
			result = result  *  r1
		return result

####################
 # FUNCTION case_1 #
####################
def case_1(a,):
	'''
	:param a
	:type a:INTEGER
	'''
	case_selector = a
	if  case_selector == 1:
		x = SIN(a)
	elif case_selector == 2:
		x = EXP(a)
	elif case_selector == 3:
		x = SQRT(a)
	elif case_selector == 4:
		x = LOG(a)
	elif case_selector == 5:
		x = LOG(a)
	else:
		x = 0
	return x
