Search
Tuesday, 2nd of March 2021, 9:18:02 UTC
9:18:39
heisig
Oh, just one more thought. Are you sure we want to use floating-point values in the compiler?
9:24:39
beach
You mean for 0.1 and 0.9? I am going to truncate them. But maybe there is a better way than to use floating point.
9:25:17
beach
Unless I truncate, I can't guarantee termination.
9:26:40
heisig
The thing is floating-point values can be a problematic in terms of portability, reproducibility and implementer sanity.
9:27:08
beach
OK, I can always use rationals.
9:28:18
beach
Only rational-preserving operations are involved.
9:29:12
beach
But I still need to truncate the result.
9:30:56
heisig
Sure. I just wanted to make sure SICL can produce reliable results, independent of the host it is being run on.
9:31:22
beach
That's a very good point.
13:45:29
Bike
to indicate branch probabilities, LLVM just uses machine integers, which are used as implicit rationals, the denominator being the maximum integer
13:46:31
Bike
so addition is just addition, and multiplication should just be multiplication followed by a shift i think
13:47:33
beach
If Common Lisp rational arithmetic becomes a problem, I'll consider something like that.
13:49:31
Bike
for runtime profiling it makes sense to make it as simple as possible, like incrementing every time you take a branch
13:49:39
Bike
and then normalizing at the end
13:50:16
beach
That too, but I am not planning to do run-time profiling. I hope I can avoid it.
20:32:41
scymtym
Bike: thanks for merging the BIR visualizer. i will probably have a few improvements later
Tuesday, 2nd of March 2021, 21:18:02 UTC