Re: 0.0 is different with 0?
- To: mathgroup at smc.vnet.net
- Subject: [mg90050] Re: 0.0 is different with 0?
- From: dh <dh at metrohm.ch>
- Date: Fri, 27 Jun 2008 06:17:35 -0400 (EDT)
- References: <g3vkss$kfs$1@smc.vnet.net>
Hi,
consider: fs_Real. This matches an expression with head Real. 0 (zero)
has head Integer. 0. has head Real. If you want to test both cases , you
may e.g. use: _?NumericQ.
hope this helps, Daniel
damayi wrote:
> Dear all
> Here is an example to show my question.
> SF[N_Integer, a_Real, fs_Real] :=
> Table[Sin[(1 + fs)*k*2 Pi/N + a], {k, 0, N - 1}]
>
> SF[32, 0.1, 0.0] can show the table contents, however, SF[32, 0.1, 0]
> cannot show the result. Why?
>
> Best Regards
> mayi
> 2008-06-26
>
--
Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>