Questions tagged [number-form]

The tag has no usage guidance.

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

Extending NumberForm

I'd like to define a function, call it NumberF, that takes a real number n and two naturals l...
0
votes
1answer
65 views

Conversion to expression in base 17 with particular needs

So, I am trying to write a function that takes a number between 0 and 1 in base 10 as input and gives a list of its decimal figures in it's expression in base 17. For example, $f(0.5)= \lbrace 8,8,8,8,...
1
vote
0answers
12 views

PaddedForm - DigitBlock only respected for non-padding

I'm trying to pad some binary and hexadecimal numbers using PaddedForm, and also to separate the digits into blocks of 4. For example, I'd like a number like ...
1
vote
0answers
48 views
1
vote
1answer
70 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
37 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
116 views

How to format a table of numbers with varying decimal points

Given: ...
13
votes
2answers
652 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
63 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
61 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
40 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
26 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
52 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
89 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
83 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
38 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
67 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
80 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
204 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
365 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
262 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
148 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
185 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 ...