Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7018
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: trap divide error with sqrt |
| Date | 2011-12-08 10:30 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jbq3k0$ini$1@smc.vnet.net> (permalink) |
| References | <201112071114.GAA04174@smc.vnet.net> |
No... THIS is your matrix:
b = {{0.47500000000000003`, 0, 0, 0.45`}, {0, 0.025`, 0, 0}, {0, 0,
0.025`, 0}, { 0.45`, 0, 0, 0.47500000000000003`}}
Try copying your version from e-mail and pasting into Mathematica, and see
what happens.
Copy as InputForm (or usually just Copy) from Mathematica and Paste into
e-mail will save a lot of trouble.
val = Eigenvalues[b]
{0.925, 0.025, 0.025, 0.025}
Sqrt[val]
{0.961769, 0.158114, 0.158114, 0.158114}
$Version
"8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"
Bobby
On Wed, 07 Dec 2011 05:14:01 -0600, Silvio Abruzzo
<silvio.abruzzo@gmail.com> wrote:
> Dear all,
> from some calculation I obtain the matrix:
>
> B=(0.47500000000000003` 0 0 0.45`
> 0 0.025` 0 0
> 0 0 0.025` 0
> 0.45` 0 0 0.47500000000000003`)
>
> I would like to calculate the square root of its eigenvalues
>
> In[5]:= val=Eigenvalues[B]
> Out[5]= {0.925,0.025,0.025,0.025}
> In[6]:= Sqrt[val]
>
> after the last command everything becomes blue and if I run dmesg in a
> linux console I obtain
>
> [ 364.840432] MathKernel[9605] trap divide error ip:18e7f18 sp:
> 7fffd421c100 error:0 in MathKernel[400000+2547000]
>
> This is really strange and I don't understand the reason.
> I would like to point out that if I calculate the single square root
> with
>
> Table[Sqrt[val[[i]]], {i,1, Length[val]}],
> I don't have any problems.
>
> Do you have any suggestions? Do you understand where is the problem in
> my code?
> I am using Mathematica 7 and my cpu is
>
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 42
> model name : Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
> stepping : 7
> cpu MHz : 800.000
> cache size : 3072 KB
> physical id : 0
> siblings : 4
> core id : 0
> cpu cores : 2
> apicid : 0
> initial apicid : 0
> fpu : yes
> fpu_exception : yes
> cpuid level : 13
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
> syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl
> vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx
> lahf_lm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept
> vpid
> bogomips : 4191.12
> clflush size : 64
> cache_alignment : 64
> address sizes : 36 bits physical, 48 bits virtual
> power management:
>
> Thank you very much in advance.
> Regards,
> Silvio
>
--
DrMajorBob@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: trap divide error with sqrt DrMajorBob <btreat1@austin.rr.com> - 2011-12-08 10:30 +0000
csiph-web