complex-float: print like any other complex number

During printing we cons new floats for imag and real part. We could
opencode that but that would add a lot of code for a little gain. If
this proves to be a real bottleneck we will refactor float printing.
This commit is contained in:
Daniel Kochmański 2019-04-11 19:16:31 +02:00
parent 2bcba673f3
commit 51594b8037

View file

@ -137,11 +137,11 @@ write_complex_float(cl_object f, cl_object stream)
default:
break;
}
writestr_stream("#<CF(", stream);
writestr_stream("#C(", stream);
si_write_ugly_object(real, stream);
ecl_write_char(' ', stream);
si_write_ugly_object(imag, stream);
writestr_stream(")>", stream);
writestr_stream(")", stream);
}
#endif