Commit 3a64ba58 authored by dbarbera's avatar dbarbera
Browse files

Added code generation for mantissa-base-exponent literals

parent 7cc1ac91
......@@ -1478,8 +1478,12 @@ def _prim_constant(prim):
@expression.register(ogAST.PrimMantissaBaseExp)
def _prim_mantissa_base_exp(prim):
''' Generate the IR for a Real with Mantissa-base-Exponent representation '''
raise NotImplementedError
''' Generate the IR for a Real with Mantissa-Base-Exponent representation '''
mantissa = int(prim.value['mantissa'])
base = int(prim.value['base'])
exponent = int(prim.value['exponent'])
return core.Constant.real(ctx.double, (mantissa * base) ** exponent)
@expression.register(ogAST.PrimConditional)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment