Re: 0.0 is different with 0?
- To: mathgroup at smc.vnet.net
- Subject: [mg90052] Re: [mg90016] 0.0 is different with 0?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 27 Jun 2008 06:17:58 -0400 (EDT)
- Reply-to: hanlonr at cox.net
For the same reason that 1. is different from 1 and you restricted the second and third argument to be explicitly Real vice just numeric. Your definition also would not work for a symbolic number such as Pi You probably want SF[N_Integer, a_?NumericQ, fs_?NumericQ] := Table[Sin[(1 + fs)*k*2 Pi/N + a], {k, 0, N - 1}] Bob Hanlon ---- damayi <damayi at gmail.com> 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 >