Skip to content

Commit

Permalink
Fixed bug in POW
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1551 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Mar 1, 2005
1 parent b95b3dc commit 4ab0927
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modeq/staticexp.rml
Expand Up @@ -4079,7 +4079,8 @@ relation operators : (Absyn.Operator, Env.Env, Types.Type, Types.Type)
-----------------------------------------------------------
operators(Absyn.DIV,env,t1,t2) => types

rule (* The POW operator *)
rule (* The POW operator. a^b is only defined for integer exponents, i.e. b must
* be of type Integer *)
let real_scalar = (Types.T_REAL([]),NONE) &
let int_scalar = (Types.T_INTEGER([]),NONE) &
let real_vector = (Types.T_ARRAY(Types.DIM(NONE),real_scalar),NONE) &
Expand All @@ -4088,7 +4089,7 @@ relation operators : (Absyn.Operator, Env.Env, Types.Type, Types.Type)
let int_pow = Exp.POW(Exp.INT) &

let scalars = [(int_pow, [int_scalar, int_scalar], int_scalar),
(real_pow,[real_scalar, real_scalar], real_scalar)] &
(real_pow,[real_scalar, int_scalar], real_scalar)] &


let arrscalar = [(Exp.POW_ARR(Exp.REAL),
Expand Down

0 comments on commit 4ab0927

Please sign in to comment.