egallesio / STklos

STklos Scheme
http://stklos.net
GNU General Public License v2.0
68 stars 17 forks source link

Don't always convert reals and integers to complexes #587

Closed jpellegrini closed 5 months ago

jpellegrini commented 11 months ago

Hi @egallesio !

I'm really not sure about this (the solution I have implemented doesn't seem very elegant to me...) But here it is. A possible solution (?) to #586.

jpellegrini commented 11 months ago

(Rationals and bignums don't require special treatment, because they can be neither inexact zero nor infinite)

egallesio commented 5 months ago

I messed a bit when merging this one. I don't understand what I have done. Anyway, I rewrote the implementation: I have not modified the convert function and done the modifications in the mult and div functions. I think that the code is simpler, and it permits to spot some issues with my original implementation. Thanks, for this PR. Your code is no more in, but it was really helpful.

egallesio commented 5 months ago

Just seen that my code doesn't correct all the issues you signaled in #586. It seems, I have to work on it again :smiling_face_with_tear:

egallesio commented 5 months ago

OK. I didn't merge the branch before pushing on GitHub. I think that this is correct now. It should also be OK with Issue #586. See this issue for details.

egallesio commented 5 months ago

I close this PR. Feel free to reopen it if needed.