Questions tagged [number-form]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
60 views

How to extract angle $0 \le \varphi < 2 \pi$ from a complex number $a + i \, b$?

Suppose you have a complex number of the standard shape $z = a + i \, b$ (where $a$ and $b$ are real numbers). How can we convert it to the polar shape $z = A \, e^{i \varphi}$? More specifically, I ...
1
vote
1answer
25 views

How to use Power with NumberForm?

Being in need of calculating the following numbers with 18 decimals of precision: $2^{2^{-x}}, x\in{\mathbb{N}}$. I looked for what built-in symbols can help me and found Power and NumberForm. I tried ...
2
votes
2answers
107 views

How to format a table of numbers with varying decimal points

Given: ...
13
votes
2answers
627 views

How to enter a repeating decimal in Mathematica

I don't understand how to manipulate numbers with repeating decimal in Wolfram Mathematica language. For example 0.3... does not work as input and I don't see how ...
0
votes
0answers
62 views

Correct way to format numbers

I have defined the following function: randvec[mag_]:= mag Normalize[Table[RandomReal[], {j, 1, 4}]] I would like to format the numbers in the list so that they ...
2
votes
1answer
49 views

Concatenate a variable with a string

I have a little problem with a variable and a string. I built a game with a panel that shows a random word,the player clicks "Yes" if he knows the meaning and clicks "No" otherwise....
1
vote
1answer
39 views

Rounding Issue with a number containing “`”

I would like to round a number saved in a weird format (I have no idea what the "`" means, could someone explain?) to 3 digits: ...
0
votes
0answers
25 views

Specific number form to CForm to String

I am using a custom function to transform my expressions to a specific NumberForm but when I subsequently do ...
1
vote
0answers
51 views

Strange behavior of NumberForm with ScientificNotationThreshold option inside Dynamic

Using the ScientificNotationThreshold option inside NumberForm causes erroneous behavior and generates a mystifying error message when used inside Dynamic. For example, running ...
1
vote
1answer
88 views

Number definition and approximation

I run these lines: a = 0.833 SetPrecision[a, 20] and this is the output: 0.833 0.83299999999999996270 I expected to ...
3
votes
1answer
82 views

Data in Atom Form

I am loading a dataset into Mathematica and the format is always recognized as an Atom String: DS[All, 4] ...
0
votes
0answers
37 views

Why does NumberForm disturb the output of Rationalize? [duplicate]

I am currently using Rationalize after NumberForm in order to check if the some values of my function are in the ...
5
votes
1answer
66 views

Augment Export function to support custom number formatting

It's a shame that the Export framework provides no support for custom formatting of real numbers. Is it possible to augment the framework so that a "NumberForm" ...
0
votes
1answer
70 views

NumberForm with fixed width and exponent as “e+00” or “e-02”

I wish to export a matrix of real numbers out to a txt file in which the entries have the MatLab form: ...
3
votes
4answers
192 views

Why do I get badly formatted numerical results when I use StringForm?

The following example prints the square and cube of numbers from 0.5 to 6 ...
2
votes
1answer
316 views

Decimal format in Mathematica exported output

I am using ReadList to read an input file as Table format, and exporting the results. The ...
3
votes
2answers
232 views

Print integer number fraction as string of numerator and denominator

I want to convert an integer number fraction as text with a certain font, size and color: Example: ...
1
vote
1answer
2k views

Rounding a number to decimal places and keeping a trailing zero

It's often useful for me to round numbers to some decimal place for printing on a graph or figure. I usually do this by: ...
2
votes
2answers
145 views

How to avoid this type of change of digits in computed numbers?

Is there a way to avoid the digits being changed? ...
2
votes
2answers
149 views

Keep the format when output is copied and pasted

I have an output and I would like to copy and paste it into another .nb file. When I copy paste using Ctrl+c and Ctrl+v. I get When I copy paste using Ctrl+Shift+c and Ctrl+v. I get Or When I use ...