{
"version": "0.1.0",
"name": "arithmetic.conversions",
"types": {},
"operations": {
"bytecast_float64_to_int64": {
"extension": "arithmetic.conversions",
"name": "bytecast_float64_to_int64",
"description": "reinterpret an float64 as an int based on its bytes, with the same endianness",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 6
}
],
"bound": "C"
}
]
}
},
"binary": false
},
"bytecast_int64_to_float64": {
"extension": "arithmetic.conversions",
"name": "bytecast_int64_to_float64",
"description": "reinterpret an int64 as a float64 based on its bytes, with the same endianness",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 6
}
],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
]
}
},
"binary": false
},
"convert_s": {
"extension": "arithmetic.conversions",
"name": "convert_s",
"description": "signed int to float",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
]
}
},
"binary": false
},
"convert_u": {
"extension": "arithmetic.conversions",
"name": "convert_u",
"description": "unsigned int to float",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
]
}
},
"binary": false
},
"ifrombool": {
"extension": "arithmetic.conversions",
"name": "ifrombool",
"description": "convert from bool into a 1-bit integer (1 is true, 0 is false)",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Sum",
"s": "Unit",
"size": 2
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 0
}
],
"bound": "C"
}
]
}
},
"binary": false
},
"ifromusize": {
"extension": "arithmetic.conversions",
"name": "ifromusize",
"description": "convert a usize to a 64b unsigned integer",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "I"
}
],
"output": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 6
}
],
"bound": "C"
}
]
}
},
"binary": false
},
"itobool": {
"extension": "arithmetic.conversions",
"name": "itobool",
"description": "convert a 1-bit integer to bool (1 is true, 0 is false)",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 0
}
],
"bound": "C"
}
],
"output": [
{
"t": "Sum",
"s": "Unit",
"size": 2
}
]
}
},
"binary": false
},
"itostring_s": {
"extension": "arithmetic.conversions",
"name": "itostring_s",
"description": "convert a signed integer to its string representation",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "prelude",
"id": "string",
"args": [],
"bound": "C"
}
]
}
},
"binary": false
},
"itostring_u": {
"extension": "arithmetic.conversions",
"name": "itostring_u",
"description": "convert an unsigned integer to its string representation",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
],
"output": [
{
"t": "Opaque",
"extension": "prelude",
"id": "string",
"args": [],
"bound": "C"
}
]
}
},
"binary": false
},
"itousize": {
"extension": "arithmetic.conversions",
"name": "itousize",
"description": "convert a 64b unsigned integer to its usize representation",
"signature": {
"params": [],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "BoundedNat",
"n": 6
}
],
"bound": "C"
}
],
"output": [
{
"t": "I"
}
]
}
},
"binary": false
},
"trunc_s": {
"extension": "arithmetic.conversions",
"name": "trunc_s",
"description": "float to signed int",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
],
"output": [
{
"t": "Sum",
"s": "General",
"rows": [
[
{
"t": "Opaque",
"extension": "prelude",
"id": "error",
"args": [],
"bound": "C"
}
],
[
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
]
]
}
]
}
},
"binary": false
},
"trunc_u": {
"extension": "arithmetic.conversions",
"name": "trunc_u",
"description": "float to unsigned int",
"signature": {
"params": [
{
"tp": "BoundedNat",
"bound": 7
}
],
"body": {
"input": [
{
"t": "Opaque",
"extension": "arithmetic.float.types",
"id": "float64",
"args": [],
"bound": "C"
}
],
"output": [
{
"t": "Sum",
"s": "General",
"rows": [
[
{
"t": "Opaque",
"extension": "prelude",
"id": "error",
"args": [],
"bound": "C"
}
],
[
{
"t": "Opaque",
"extension": "arithmetic.int.types",
"id": "int",
"args": [
{
"tya": "Variable",
"idx": 0,
"cached_decl": {
"tp": "BoundedNat",
"bound": 7
}
}
],
"bound": "C"
}
]
]
}
]
}
},
"binary": false
}
}
}