On Fri Sep 8 15:59:32 2023 +0000, Giovanni Mascellani wrote:
The trick I know takes advantage of function overloading:
float test(float x) { return 1.0; } float test(half x) { return 2.0; } float main() { return test(determinant(x)); }
Right, for half arguments it returns half result, judging by test() overload it picks. So that probably means I actually do need a template to produce different return type. It's also annoying if internal variables can't be kept as floats.