Minimizing a quadratic form: Failed to converge to the requested accuracy or precision within 100 \ iterations

I’m trying to minimize this type of quadratic form:

expr = (-0.1 x1 + x2 + 1.2 x3 + x4 - x5)^2 + (x1 + 1.2 x2 + x3 - x4 -      0.1 x5)^2 + (1.2 x1 + x2 - x3 - 0.1 x4 + x5)^2 + (-x1 - 0.1 x2 +      x3 + 1.2 x4 + x5)^2 + (x1 - x2 - 0.1 x3 + x4 + 1.2 x5)^2 

where x1,…,x5 are integers not simulteneously zero. Then I performed

Minimize[expr,   x1^2 + x2^2 + x3^2 + x4^2 + x5^2 != 0, {x1, x2, x3, x4,    x5}, Integers] 

which apparently yields a solution {4.45, {x1 -> 0, x2 -> 0, x3 -> 0, x4 -> -1, x5 -> 0}}, but with the warning ‘NMinimize::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations.’

Does this mean that the solution is not actually a solution? What is the meaning behind the warning? I can only find information related to ‘NMinimize’ (in which I believe ‘Minimize’ is based).

Is there a performance or storage space advantage to lowering time/timestamp precision in PostgreSQL?

PostgreSQL allows time/timestamp to specify a precision:

time, timestamp, and interval accept an optional precision value p which specifies the number of fractional digits retained in the seconds field. By default, there is no explicit bound on precision. The allowed range of p is from 0 to 6.

From PostgreSQL 13 Documentation

However it states that storage space is a constant 8-bytes for (timestamp and time without timezone) and 12-bytes for time with timezone regardless of p.

In the case that one doesn’t need extra precision — say milliseconds(p = 3) or seconds(p=0) would suffice — is there an advantage to explicitly lowering the precision?

What is a Precision Lathe?

Sometimes a shop doesn’t do enough turning work to justify the purchase of a CNC lathe. But when it needs to produce precision turned parts, even if for a very small lot size, the shop needs a solution.

Such was the case for Sturges DesignWorks, a company in Portland, Ore., that provides automation and design engineering solutions in a variety of industries, including medical products, electronics, fixturing and tooling, and research and development. The company was working with a client who needed a special machine built that required substantial CNC lathe work. But Sturges didn’t have a lathe. “CNC lathes are expensive, take up much needed floor space, and have a steep learning curve,” explains Dan Sturges, company CEO. He considered a CNC mini lathe, but found that it would not be precise, rigid or accurate enough for the work required.
To address the issue, the company developed what it calls the Sturges Turning Head system to bridge the gap between traditional, full-featured CNC lathes and low-productivity, small CNC mini lathes. “I had always wondered why we couldn’t somehow do precision CNC lathe work on a CNC milling machine,” Mr. Sturges says. “The problem is, even if you attach a lathe tool to the mill spindle and lock it, there’s still a tiny bit of play that makes it impossible to maintain a standard of precision. So we developed a turning bar toolholder that places the tip of the tool at the spindle’s center of rotation, eliminating the slight play in the tool tip and providing the precision and accuracy needed for professional, high-quality swis type automatic lathe work on a mill.” Based on this principle, the company built the prototype for the Turning Head system, which is capable of external turning, facing and contouring operations. An optional cross slide accessory bolts onto the table, allowing for plunge operations such as parting and grooving.

The Turning Head spindle—the equivalent of a lathe headstock—is made of steel and cast iron and uses premier Grade 7 pre-loaded ball bearings that are lubricated for life. The standard model has less than 50 millionths of an inch runout, and the super-precision model has less than 20 millionths. It has a large, through-bore 5C spindle with a 4-degree taper mount nose.

The system comes with a set of three turning bars, each with an R8 or 3/4-inch straight. The universal design allows left-hand, right-hand and center cutting operations simply by rotating the tool. Tool changes between different turning operations are eliminated. The toolholders are available in three sizes (1/32 radius, 1/64 radius and 1/128 radius) and maintain cutter concentricity to less than 0.001-inch TIR.

Operating the system is straightforward. The operator places a piece of stock in the spindle, tightens the collet, turns on the unit, and hits “Go” on the CNC interface. The system allows the machinist to set up a job on a mill and crank out smooth, accurate parts in a repetitive way. Operating on the existing milling machine’s software, the CNC program provides fast, efficient operation without the need to learn new software.

It’s hard to justify the expense of a multi-axis precision CNC lathe when only one, ten or 100 parts are required. “Machinists, engineering departments, automation groups, tool makers, mold makers and machine builders often don’t have the need for high-volume production,” Mr. Sturges says. “What they need is an economical way to create precision lathe parts.”

The Turning Head system can fill that void. Indexing capability allows indexing the work and seamlessly transitions between milling and turning operations on the same part in the same setup. Multi-axis capability is achieved on an existing machine in the shop. According to Mr. Sturges, “Parts made with this system are indistinguishable from parts made on a swiss CNC machine—same accuracy, same repeatability, same quality.” In a sense, it’s the best of both worlds.

A precision swis lathe is a computerized lathe used to create detailed solid objects from a single piece of wood or metal. Using a sophisticated computer software, the precision swis turning lathe can produce a near-finished product with minimal waste. A lathe functions by spinning the raw materials while cutting, drilling, sanding, knurling or deforming. The use of a lathe produces a finished product that is symmetrical along the axis of rotation.

Earlier versions of a lathe have been traced back to the Egyptians, who developed a two person lathe using a manual process. This design was improved by the Romans who added a turning bow to provide a more consistent turning rate. In the Middle Ages the pedal was added to allow the craftsman to use both hands to work on the wood. This type of lathe is called a spring pole lathe and the development was critical to expanding the types of items that could be created on a lathe. A great lathe was the first lathe to allow the piece to turn continuously but was powered by one person turning a crank while the other worked on the piece.

Only during the early 19th century was a motorized lathe developed. This change significantly reduced the time needed to complete an item and allowed the addition of metal in the process. The addition of computers in the early 1970s created precision lathes that are used today for the mass production of high quality product. This shift has removed the need for master craftsman and replaced these roles with computer operating technicians.

A precision lathe, such as single spindle automatic lathe, is able to cut and shape a material to within 0.001 inches (0.00254 cm) of accuracy. The cylindrical basis of the lathe means that the material is secured at each end and the product is created by the removal of materials from the solid item. A precision lathe is used to create baseball bats, table legs, poles and a wide range of ornamental pieces.

In order to work with a precision lathe, you will need to be trained on the specific equipment used. The original design of the product is completed by a product design and the actual programming is done by the lathe operator. Repeated testing is completed before the mass production work is started. The modern lathe is a highly complex machine that can product thousands of items an hour.

When purchasing a precision lathe, it is important to review the detailed product specifications. Make sure it will have the capability of creating the types of products that you require. Check the details of the warranty and service agreement to ensure that your investment is properly covered.

Does rogue’s vest bonus damage apply separately for each precision damage source?

Rogue’s vest (MiC 130) grants users with "the skirmish, sneak attack, or sudden strike ability" an extra 1d6 damage "when making such an attack"

Does this mean that, for example, a scout 1/rogue 1/ninja 1 that moves 10 feet and attacks a flat-footed opponent (who lacks uncanny dodge) deals 1d6 base skirmish damage plus 1d6 extra damage because they made "such an attack", as well as 1d6 base sneak attack damage plus 1d6 extra damage for making "such an attack" and 1d6 base sudden strike damage plus 1d6 extra…For a total of 6d6 precision damage? Or is the "attack" only granted the item’s bonus damage once, for a total of 4d6 precision damage?

Would Precision Attack apply for a melee spell attack?

I’ve searched here and in various reference books but can’t find this specific answer. The description of the Battlemaster Precision Attack maneuver states it can be used for any weapon attack. Thorn Whip for example uses magic to create a weapon….that is not magic. So would that "weapon" attack count towards as being able to used with Precision Attack even though the attack is using a spell?

Plotting a small gaussian | Small values and dealing with Machine Precision

I’ve defined the following:

k := 1.38*10^-16 kev := 6.242*10^8 q := 4.8*10^-10 g := 1.66*10^-24 h := 6.63*10^-27 


b = ((2^(3/2)) (\[Pi]^2)*1*6*(q^2)*(((1*g*12*g)/(1*g + 12*g))^(   1/2)) )/h  T6 := 20 T := T6*10^6 e0 := ((b k T6 *10^6)/2)^(2/3)  \[CapitalDelta] := 4/\[Sqrt]3 (e0 k T6 *10^6)^(1/2)  \[CapitalDelta]kev = \[CapitalDelta]*kev e0kev = e0*kev bkev = b*kev^(1/2) 

Then, I want to plot these functions:

fexp1[x_] = E^(-bkev *(x*kev)^(-1/2)) fexp2[x_] = E^(-x/(k*T)) fexp3[x_] = fexp1[x]*fexp2[x] 

and check that this Taylor expansion works:

fgauss[x_] =   Exp[(-3 (bkev^2/(4 k T*kev ))^(1/3))]*   Exp[(-((x*kev - e0kev)^2/(\[CapitalDelta]kev/2)^2))] 

which should, e.g., as expected:

Figure 10.1

This plot came from "Stellar Astrophysics notes" of Edward Brown (also it is a known approximation).

I used this line of command to Plot:

Plot[{fexp1[x],fexp2[x],fexp3[x],fgauss[x]}, {x, 0, 50},   PlotStyle -> {{Blue, Dashed}, {Dashed, Green}, {Thick, Red}, {Thick,      Black, Dashed}}, PlotRange -> Automatic, PlotTheme -> "Detailed",   GridLines -> {{{-1, Blue}, 0, 1}, {-1, 0, 1}},   AxesLabel -> {Automatic}, Frame -> True,   FrameLabel -> {Style["Energía E", FontSize -> 25, Black],     Style["f(E)", FontSize -> 25, Black]}, ImageSize -> Large,   PlotLegends ->    Placed[LineLegend[{"","","",""}, Background -> Directive[White, Opacity[.9]],      LabelStyle -> {15}, LegendLayout -> {"Column", 1}], {0.35, 0.75}]] 

but it seems that Mathematica doesn’t like huge negative exponentials. I know I can compute this using Python but it’s a surprise to think that Mathematica can’t deal with the problem somehow. Could you help me?

Is it needed to increase the precision of ContourPlot in this case?

I have this function and I want to see where it is zero. $ $ \frac{1}{16} \left(\sinh (\pi x) \left(64 \left(x^2-4\right) \cosh \left(\frac{2 \pi x}{3}\right) \cos (y)+\left(x^2+4\right)^2+256 x \sinh \left(\frac{2 \pi x}{3}\right) \sin (y)\right)+\left(x^2-12\right)^2 \sinh \left(\frac{7 \pi x}{3}\right)-2 \left(x^2+4\right)^2 \sinh \left(\frac{5 \pi x}{3}\right)\right)+2 \left(x^2-4\right) \sinh \left(\frac{\pi x}{3}\right)$ $ I use ContourPlot

f[x_, y_] :=    2 (-4 + x^2) Sinh[(π x)/3] +     1/16 (((4 + x^2)^2 + 64 (-4 + x^2) Cos[y] Cosh[(2 π x)/3] +           256 x Sin[y] Sinh[(2 π x)/3]) Sinh[π x] -        2 (4 + x^2)^2 Sinh[(5 π x)/3] + (-12 + x^2)^2 Sinh[(         7 π x)/3]);  ContourPlot[  f[x, y] == 0, {x, 3.465728, 3.465729}, {y, 1.046786, 1.046795},   PlotPoints -> 500]  

and I obtain this plot

enter image description here

Now, my question is that can I trust this plot and conclude that the curves do not cross?

Or, I should increase the precision of the plot? And if so, how can I ask Mathematica to give higher precision for the axis in ContourPlot?

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:

enter image description here

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?

Precision about distance between cities for “Glorious Reikland”?

I start the creation of a campaign for WFRP4e settled in the Reikland, the main country of the core rulebook. I use the map in order to create a path for caravaners, but I need to know distances between cities. I looked up for a map caption like the image below but found nothing. Same for the book section “Glorious Reikland p267.

enter image description here

Since I do not have information about the “size” of the country, I can’t guess. Is there any information, clues or anything else that allow me to deduce the distance between other cities ?

Map of Reikland