1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

More distinguished handling of real and complex values.

This commit is contained in:
Dirk Herrmann 2000-05-10 12:34:43 +00:00
parent 7235ee58f5
commit eb42e2f03a
8 changed files with 52 additions and 27 deletions

View file

@ -447,7 +447,7 @@ vector_scale (SCM v, double c)
int n = SCM_LENGTH (v);
if (SCM_VECTORP (v))
while (--n >= 0)
SCM_REAL (SCM_VELTS (v)[n]) *= c;
SCM_REAL_VALUE (SCM_VELTS (v)[n]) *= c;
else
while (--n >= 0)
((double *) SCM_VELTS (v))[n] *= c;
@ -461,7 +461,7 @@ vector_sum_squares (SCM v)
if (SCM_VECTORP (v))
while (--n >= 0)
{
x = SCM_REAL (SCM_VELTS (v)[n]);
x = SCM_REAL_VALUE (SCM_VELTS (v)[n]);
sum += x * x;
}
else