Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14967

Re: How to remove the "0." from "0. + 1.41774i"

From Richard Fateman <fateman@cs.berkeley.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to remove the "0." from "0. + 1.41774i"
Date 2013-06-22 07:29 +0000
Message-ID <kq3joh$ner$1@smc.vnet.net> (permalink)
References <20130620084452.627F569EF@smc.vnet.net> <58732FA6-FDFE-4100-8637-926219C678F6@gmail.com> <CAJxy_SqurCkArZaLNQDN+35u3YT8XjAL7g7wsL9cvnSOV9MLKg@mail.gmail.com> <kq17bv$goc$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


1.  Mathematica 7.0 performs differently.

4.0*I  looks like 4.I

Mathematica 9. does this..
4.0*I looks like
   0.+4.I

2.  If you want to do something different, consider something
like this:

  f[x_Complex]: If [VerySmall[Re[x]], Im[x]*i, Re[x]+Im[x]*i]

where VerySmall is defined as you wish.  Could be  VerySmall(x_]:=x==0.0 
  for example.

Note that the answers are no longer complex numbers because they involve
the symbol i   not I.

You can do   %/. i->I
but then you will see 0.+4.I  again.

RJF




Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How to remove the "0." from "0. + 1.41774i" Sseziwa Mukasa <mukasa@gmail.com> - 2013-06-21 09:45 +0000
  Re: How to remove the "0." from "0. + 1.41774i" Richard Fateman <fateman@cs.berkeley.edu> - 2013-06-22 07:29 +0000
  Re: How to remove the "0." from "0. + 1.41774i" Christoph Lhotka <christoph.lhotka@univie.ac.at> - 2013-06-23 00:40 +0000
  Re: How to remove the "0." from "0. + 1.41774i" Richard Fateman <fateman@eecs.berkeley.edu> - 2013-06-23 00:40 +0000
  Re: How to remove the "0." from "0. + 1.41774i" Christoph Lhotka <christoph.lhotka@univie.ac.at> - 2013-06-23 00:41 +0000

csiph-web