diff --git a/src/CHANGELOG b/src/CHANGELOG index c7ce19b2d..5f7858945 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -37,6 +37,9 @@ ECL 0.9h - SUBTYPEP formerly broken when handling (EQL #C(...)) + - Fixed several type propagations: for instance, the compiler assumed that + SQRT of a real number is always real. + * Design: - Simplified the structure of the frame stack, removing redundant fields. diff --git a/src/cmp/sysfun.lsp b/src/cmp/sysfun.lsp index 8f01977c0..12dcd6b96 100644 --- a/src/cmp/sysfun.lsp +++ b/src/cmp/sysfun.lsp @@ -867,8 +867,8 @@ (def-inline log :always (fixnum-float) :float "(float)log((double)(#0))") (proclaim-function sqrt (number) number :no-side-effects t) -(def-inline sqrt :always (fixnum-float) :double "sqrt((double)(#0))") -(def-inline sqrt :always (fixnum-float) :float "(float)sqrt((double)(#0))") +(def-inline sqrt :always ((or (long-float 0.0 *) (double-float 0.0 *))) :double "sqrt((double)(#0))") +(def-inline sqrt :always ((or (single-float 0.0 *) (short-float 0.0 *))) :float "(float)sqrt((double)(#0))") (proclaim-function sin (number) number :no-side-effects t) (def-inline sin :always (fixnum-float) :double "sin((double)(#0))")