Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1416 > unrolled thread
| Started by | dr DanW <dmaxwarren@gmail.com> |
|---|---|
| First post | 2011-04-02 07:52 +0000 |
| Last post | 2011-04-04 10:32 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Problem: Approximate complex values in Mathematica 8.0.1 dr DanW <dmaxwarren@gmail.com> - 2011-04-02 07:52 +0000
Re: Problem: Approximate complex values in Mathematica 8.0.1 David Bailey <dave@removedbailey.co.uk> - 2011-04-04 10:32 +0000
| From | dr DanW <dmaxwarren@gmail.com> |
|---|---|
| Date | 2011-04-02 07:52 +0000 |
| Subject | Problem: Approximate complex values in Mathematica 8.0.1 |
| Message-ID | <in6kk6$2kc$1@smc.vnet.net> |
As noted in this discussion:
https://groups.google.com/d/topic/comp.soft-sys.math.mathematica/K06SxXE72gM/discussion
The way Mathematica 8.0.1 handles approximate complex values has changed. In the related discussion, the change only seemed to effect the way approximate complex values were displayed
In[28]:=N[8*I]
Out[28]= 0. + 8. I
This is different from prior behavior, where the answer was 8. I
Now I have found a situation where it causes a package I wrote to fail. The simplest embodiment of the problem I can find is:
In[29]:= fnc = Interpolation[{{0, 0}, {2, 2}}, InterpolationOrder -> 1];
In[30]:= fnc[1. I/I]
Out[30]= InterpolatingFunction[][1. + 0. I]
The function does not evaluate because it is expecting a real input. I can't confirm that this is new to 8.0.1 (no old installations of Mathematica around), but I have never encountered this problem with my package before.
Remember, I have reduced the problem to triviality for this posting. In the actual application, the situation is much more complex and deeply buried, so even the obvious simple workarounds are not available to me without lots of work.
Daniel
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2011-04-04 10:32 +0000 |
| Message-ID | <inc6nd$115$1@smc.vnet.net> |
| In reply to | #1416 |
On 02/04/2011 08:52, dr DanW wrote:
> As noted in this discussion:
> https://groups.google.com/d/topic/comp.soft-sys.math.mathematica/K06SxXE72gM/discussion
>
> The way Mathematica 8.0.1 handles approximate complex values has changed. In the related discussion, the change only seemed to effect the way approximate complex values were displayed
>
> In[28]:=N[8*I]
>
> Out[28]= 0. + 8. I
>
> This is different from prior behavior, where the answer was 8. I
>
> Now I have found a situation where it causes a package I wrote to fail. The simplest embodiment of the problem I can find is:
>
> In[29]:= fnc = Interpolation[{{0, 0}, {2, 2}}, InterpolationOrder -> 1];
>
> In[30]:= fnc[1. I/I]
>
> Out[30]= InterpolatingFunction[][1. + 0. I]
>
> The function does not evaluate because it is expecting a real input. I can't confirm that this is new to 8.0.1 (no old installations of Mathematica around), but I have never encountered this problem with my package before.
>
> Remember, I have reduced the problem to triviality for this posting. In the actual application, the situation is much more complex and deeply buried, so even the obvious simple workarounds are not available to me without lots of work.
>
> Daniel
>
Yet with 8.0.1, I find:
In[621]:= 1.*I/I //Head
Out[621]= Real
In[622]:= 1.+I/I //Head
Out[622]= Real
David Bailey
http://www.dbaileyconsultancy.co.uk
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web