File: floatrep.py

package info (click to toggle)
llvmlite 0.46.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,140 kB
  • sloc: python: 13,605; cpp: 3,192; makefile: 185; sh: 168
file content (9 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
from llvmlite.ir import Constant, FloatType, DoubleType
import math

print(Constant(FloatType(), math.pi))
print(Constant(DoubleType(), math.pi))
print(Constant(FloatType(), float('+inf')))
print(Constant(DoubleType(), float('+inf')))
print(Constant(FloatType(), float('-inf')))
print(Constant(DoubleType(), float('-inf')))