bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (< complex) and friends


From: Neil Jerram
Subject: Re: (< complex) and friends
Date: Tue, 12 Aug 2008 10:18:26 +0100

2008/8/11 Bill Schottstaedt <address@hidden>:
> guile> (< 1.0+1.0i)
> #t
> guile> (< 2.0 1.0+1.0i)
>
> Backtrace:
> In standard input:
>   2: 0* [< 2.0 {1.0+1.0i}]
>
> standard input:2:1: In procedure < in expression (< 2.0 1.0+1.0i):
> standard input:2:1: Wrong type: 1.0+1.0i
> ABORT: (wrong-type-arg)

My guess (without actually looking at the code) is that

- using < etc with complex numbers will always give a wrong type arg error

- the single arg case is being optimized before reaching the check for
a complex number.

What behaviour would you prefer?  (Perhaps to say that < etc. only
compare the real parts of the provided numbers?  Is there any
precedent for that in other Schemes or standards?)

      Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]