mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Return fixnum if sqrt(fixnum) is an exact int
This commit is contained in:
parent
32af1bcd05
commit
887e1e5aa9
1 changed files with 3 additions and 0 deletions
|
@ -111,6 +111,9 @@
|
|||
}
|
||||
|
||||
if (cimag(result) == 0.0) {
|
||||
if (obj_is_int(z) && creal(result) == round(creal(result))) {
|
||||
return_closcall1(data, k, obj_int2obj(creal(result)));
|
||||
}
|
||||
make_double(d, creal(result));
|
||||
return_closcall1(data, k, &d);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue