## [Semediawiki-user] Semantic arithmetic

 [Semediawiki-user] Semantic arithmetic From: Trevor Wennblom - 2007-05-30 04:03:27 ```With the ParserFunctions extension enabled I see I can do something =20 like this: [[engine_power:=3D{{#expr: 2*300}} hp]] What I would really like to do is something along these lines: [[my_power:=3D{{ #expr: [[engine_power:=3D300 hp]] * 2 }} hp]] Perhaps even (assuming hp and Watts is a defined conversion): [[my_power:=3D{{ #expr: [[engine_power:=3D300 hp]] + =20 [[engine_power:=3D120 Watts]] }} hp]] And even better: [[my_weird_squared_power:=3D {{ #expr: [[engine_power:=3D300 hp]] * =20= [[engine_power:=3D120 Watts]] }} ]] or [[my_weird_squared_power:=3D {{ #expr: [[engine_power:=3D300 hp]] * =20= [[engine_power:=3D120 Watts]] }} Watts=B2]] Is anything like this remotely possible at the moment? I know the =20 Temperature conversion is a special native case that seems to bear a =20 small resemblance to this. Trevor= ```

 [Semediawiki-user] Semantic arithmetic From: Trevor Wennblom - 2007-05-30 04:03:27 ```With the ParserFunctions extension enabled I see I can do something =20 like this: [[engine_power:=3D{{#expr: 2*300}} hp]] What I would really like to do is something along these lines: [[my_power:=3D{{ #expr: [[engine_power:=3D300 hp]] * 2 }} hp]] Perhaps even (assuming hp and Watts is a defined conversion): [[my_power:=3D{{ #expr: [[engine_power:=3D300 hp]] + =20 [[engine_power:=3D120 Watts]] }} hp]] And even better: [[my_weird_squared_power:=3D {{ #expr: [[engine_power:=3D300 hp]] * =20= [[engine_power:=3D120 Watts]] }} ]] or [[my_weird_squared_power:=3D {{ #expr: [[engine_power:=3D300 hp]] * =20= [[engine_power:=3D120 Watts]] }} Watts=B2]] Is anything like this remotely possible at the moment? I know the =20 Temperature conversion is a special native case that seems to bear a =20 small resemblance to this. Trevor= ```