Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
3a64ba58
Commit
3a64ba58
authored
Aug 05, 2014
by
dbarbera
Browse files
Added code generation for mantissa-base-exponent literals
parent
7cc1ac91
Changes
1
Hide whitespace changes
Inline
Side-by-side
LlvmGenerator.py
View file @
3a64ba58
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment