I’d like to print all in TraditionalForm "f(z)=(z+1)/(z-1)" where f is a function defined in the usual way. What I obtain in Output for f(z) and (z+1)/(z-1) is not the TraditionalForm. What can I do? Thanks

# Tag: print

## Why don’t AccountingForm, NumberForm and DecimalForm print more decimals?

I have the following set of equations:

`xs = 9295050963679385441209; ys = 10721945986215692199666; x = xs - 10000; exponent = 0.666451549104308964``18; xs1gt = Power[xs,exponent]; `

Which should produce ~437295921404696.997750975489799605.

If I naively print `xs1gt`

, I get this:

`4.372959214046970*10^14 `

I looked for solutions on StackExchange, and I found the How to avoid the scientific notation in output? thread. Unfortunately, none of the solutions proposed there worked:

`AccountingForm[xs1gt, 33] DecimalForm[xs1gt, {15, 18}] N[xs1gt, 33] NumberForm[xs1gt, 33] NumberForm[xs1gt, 33, ExponentFunction->(Null&)] NumberForm[xs1gt, 33, ScientificNotationThreshold->{-Infinity, Infinity}] `

Outputs:

`437295921404697.0 437295921404697.000000000000000000 4.372959214046970*10^14 4.372959214046970*10^14 437295921404697.0 437295921404697.0 `

I searched high and low for alternatives, and I stumbled upon InputForm and SetPrecision, which finally gave me satisfactory results:

`InputForm[xs1gt] SetPrecision[xs1gt, 33] `

Outputs:

`4.372959214046969977509754897996045`16.295988813986288*10^14 4.37295921404696997750975489799605*^14 `

Now my question is why didn’t the other approaches, i.e. `AccountingForm`

, `DecimalForm`

and `NumberForm`

, produce a similar result with 33 significant figures of precision (15 digits and 18 decimals)? I am especially confused by `DecimalForm`

not having worked the way I expected.

## After using GenerateAsymmetricKeyPair[], how to print the two keys in hex?

After using `GenerateAsymmetricKeyPair`

in Mathematica 12, how can I print the two keys in hex?

There is probably a simple answer that I’m missing, but there’s nothing about this in the documentation for `GenerateAsymmetricKeyPair`

.

## Cannot 3D print prisms and ellipsoids

I get errors if I try to `Printout3D[ ]`

or `Export[ ]`

to an `.stl`

file an object containing either an ellipsoid or prisms with any complexity. For example, neither:

`testError = Graphics3D[{Tube[{{0, 0, 0}, {1, 1, 1}}, .1], Ellipsoid[{1, 1, .5}, {1, 1, .1}]}] `

… nor

`pos=20; top=.9; bottom=.1 testError=Graphics3D[ Table[Prism[{{0, 0, top}, {1.2 Cos@x, 1.2 Sin@x,top}, {1.2 Cos[x + 2 Pi/pos], 1.2 Sin[x + 2 Pi/pos], top}, {0, 0, bottom}, {1.2 Cos@x, 1.2 Sin@x,bottom}, {1.2 Cos[x + 2 Pi/pos], 1.2 Sin[x + 2 Pi/pos],bottom}}], {x, 0, 2 \[Pi] - 2 \[Pi]/pos, 5 2 \[Pi]/pos}]] `

… produce the expected results with either `Export["test.stl",testError]`

or `Pintout3D[testError,"test.stl"]`

. What am I doing wrong? Using 12.1.

## How can one print the current sysmon configuration?

I’m trying to verify my sysmon configuration is correct. So I need to print the whole configuration in the client computer.

I’ve already took a look here, the only similar option is `-s`

, and it only print the schema.

How can I print the configuration?

## Solve boundary value problem with NDSolve. How to print out approximations to a solution?

I solve particular boundary-value-problem for ODE with NDSolve “Shooting” method. The case is that solution is attained very slow, that seems to mean that boundary-value-problem which is supposed to be well-defined enough, in fact, is ill at some place. So i try figure out. First step is to see concrete values of a produced approximations to a solution. What language constructs should i use for that?

Simple example. Suppose we consider particle motion in vertical plane. We throw our particle from initial point with coordinates {x0,y0} := {0,0} and initial trajectory angle 45 degrees. And try to achieve point with coordinates {x1,y1} := {1,0} by varying particle initial velocity. We don’t know two things here: initial velocity and a duration of a motion. Here is how that toy problem can be presented and solved in *mathematica*:

`gravity = 10; bvpsol = NDSolve[ { { (* ODE system (5th order) *) {x''[u] / c[u]^2 == 0, y''[u] / c[u]^2 == -gravity, c'[u] == 0}, (* boundary conditions (5 items) *) {x[0] == y[0] == 0, x[1] == 1, y[1] == 0, x'[0] == y'[0]} } }, {x[u], y[u], c[u]}, u, Method -> {"Shooting", "StartingInitialConditions" -> {x[0] == y[0] == 0, x'[0] == y'[0] == 1, c[0] == 1}}] // Flatten; {dxdu, dydu} = D[{x[u], y[u]} /. bvpsol, u]; {vx0, vy0} = ({dxdu, dydu} / c[u] /. bvpsol) /. {u -> 0}; duration = c[u] /. bvpsol /. {u -> RandomReal[]}; ivpsol = NDSolve[{ (* ODE system *) {x''[t] == 0, y''[t] == -gravity}, (* initial values *) {x[0] == y[0] == 0, x'[0] == vx0, y'[0] == vy0} }, {x[t], y[t]}, {t, 0, duration}]; ParametricPlot[{x[t], y[t]} /. ivpsol, {t, 0, duration}, GridLines -> Automatic, AspectRatio -> 1/2] `

**Question:** Now what options or language construct should i use to see approximations which are produced NDSolve while solving boundary-value-problem?

## Using ScalingFunctions to ListPlot data in specific range and also to print FrameTicks with appropriate precision, gives strange fluctuations

Through the following code, we generate Tp1:

`In[1]:= tempPV = ( 3 \[Pi]^(2/3) + 6 6^(2/3) P \[Pi] V^(2/3) - 6^(2/3) V^( 2/3) (-3 + Sqrt[ 9 + (4 6^(2/3) \[Pi]^(4/3) q^2)/( V^(4/3) \[Beta]^2)]) \[Beta]^2 + 3 6^(2/3) V^( 2/3) \[Beta]^2 Log[ 1/6 (3 + Sqrt[ 9 + (4 6^(2/3) \[Pi]^(4/3) q^2)/(V^(4/3) \[Beta]^2)])])/( 6 6^(1/3) \[Pi]^(4/3) V^(1/3)); In[2]:= \[Beta]in = 0.01; \[Beta]fi = 100; \[Beta]st = 0.005; Table[ xlog[\[Beta]] = Log[10, \[Beta]] , {\[Beta], \[Beta]in, \[Beta]fi, \[Beta]st}]; In[6]:= parap1 = {q -> 0.1, V4 -> 5000}; parap2 = {T2 -> 15, q -> 0.1, V2 -> 10000}; parap4 = {T4 -> 5, q -> 0.1, V4 -> 5000}; In[9]:= Table[ pressp2[\[Beta]] = P /. Solve[(tempPV - T2 == 0) /. V -> V2 /. parap2, P][[1]];(*p1= p2*) pressp4[\[Beta]] = P /. Solve[(tempPV - T4 == 0) /. V -> V4 /. parap4, P][[1]];(*p3= p4*) Tp1[\[Beta]] = T1 /. Solve[(tempPV - T1 == 0) /. V -> V4 /. parap1 /. P -> pressp2[\[Beta]], T1][[1]]; , {\[Beta], \[Beta]in, \[Beta]fi, \[Beta]st}]; In[10]:= mi = Min[Table[Tp1[\[Beta]], {\[Beta], \[Beta]in, \[Beta]fi, \[Beta]st}]] ma = Max[Table[ Tp1[\[Beta]], {\[Beta], \[Beta]in, \[Beta]fi, \[Beta]st}]] Out[10]= 11.9083 Out[11]= 11.9083 In[12]:= ListPlot[ Table[{xlog[\[Beta]], Tp1[\[Beta]]}, {\[Beta], \[Beta]in, \[Beta]fi, \[Beta]st}], ScalingFunctions -> {Rescale[#, {mi, ma}, {0.`, 1.`}] &, Rescale[#, {0.`, 1.`}, {mi, ma}] &}, Joined -> True, Frame -> True, FrameStyle -> Black, BaseStyle -> {FontSize -> 14, PrintPrecision -> 11}, FrameLabel -> {"\!\(\*SubscriptBox[\(log\), \(10\)]\) (\[Beta])", "\!\(\*SubscriptBox[\(T\), \(1\)]\)"}, RotateLabel -> False, PlotStyle -> {Blue, Thickness[0.006]}, PlotRange -> {{-2, 2}, {mi, ma}}, Axes -> None, AspectRatio -> 0.8, ImageSize -> 400, FrameTicks -> {{ticks, None}, {Automatic, None}}] `

The result is the following plot:

As it is clear there is a strange fluctuation for $ log_{10}^{\beta}=1-2$ . As it should be a smooth decreasing plot, what is the origin of these fluctuations? How to fix this possibly numerical error?

## Write an algorithm reading some numbers and print the ones with the sum of their digits greater than $35$

Write an algorithm reading some numbers and print the ones with the sum of their digits greater than $ 35$ .

My try:

**1)** Start

**2)** $ N\leftarrow 0$

**3)** $ S \leftarrow 0$

**4)** $ R \leftarrow N-10\lfloor\frac{n}{10}\rfloor$

**5)** $ S \leftarrow R+S$

**6)** $ N\leftarrow\lfloor\frac{n}{10}\rfloor$

**7)** If $ N>0$ , go to $ 4$ , otherwise print $ S$

**8)** If $ S\le35$ then $ N\leftarrow N+1$ , otherwise print $ N$

**9)** end

I’m not sure if this algorithm works,so can someone please check that? plus does there exist any algorithm that determines the numbers such that the sum of their digits is greater than $ 35$ , besides determines how many such numbers exist? (I think they are infinity many such numbers)

## Is there any difference between original prints and PoD (Print on Demand) source books?

Regarding source books by Onyx Path/White Wolf (for the World of Darkness), is there any difference between original prints and PoD (Print on Demand) source books?

Basically, is there a way to know if a source book is an original print? Are there any differences in paper or print quality? Are there other ways to tell them apart?

## Venus RISC-V how to loop, compare, and print?

I am trying to loop through an array and if the number is larger than X then print.

I’ve tried to find tutorials online but I’m just stuck on why it is not working/outputting anything. My comments kind of explain what i tried to do.

`.data arrayOfNums: .word 0 .word 1 .word 122 .word 1112 .word 4294967295 .word 22 .word 234234 .word 23332 .word 42 .word 23423 K: .word 2237 .text .globl main main: #### *** vv My problem starts here vv *** #### la t0 K #set t0 to K la t1 arrayOfNums #set t1 pointer to array addi a1 t0 0 #add t0 deallocated to a1 addi a2 t1 0 #add t1 deallocated to a2 loop: addi a0 x0 1 # print_int ecall addi a1 t1 0 # add t1 value to print ecall addi t1, t1, 4 # Increments t1 to move to the next element jal x0, loop exit: ####Exit using environmental calls#### addi a1 x0 0 # random exit 0 addi a0 x0 17 # print_int ecall ecall `

Thank you for your help!!