4.30.1 Top new questions this week

4.30.1.1 Why can't I inject expressions in Compile using (only) With
4.30.1.2 Why Mathematica can not factorize polynomials over algebraic fields?
4.30.1.3 RegionMeasure is wrong for simple 1D Path
4.30.1.4 Why am I seeing what looks like a violation of operator precedence?
4.30.1.5 Need a gentle introduction to stylesheet writing
4.30.1.6 Unexpected behavior when directly assigning to DownValues
4.30.1.7 Except @ OptionsPattern[] affects OptionValue
4.30.1.1 Why can't I inject expressions in Compile using (only) With

https://mathematica.stackexchange.com/questions/153064/why-cant-i-inject-expressions-in-compile-using-only-with

 
Generally speaking, With can be used to inject into arbitrarily held expressions, for example: 
 
With[{args = 2}, 
Hold @ Hold @ HoldComplete[args] 
] 
(* Out[1]= Hold[Hold[HoldComplete[2]]] *) 
...
 

- asked by glS (14 votes), answered by Leonid Shifrin (15 votes)

4.30.1.2 Why Mathematica can not factorize polynomials over algebraic fields?

https://mathematica.stackexchange.com/questions/152949/why-mathematica-can-not-factorize-polynomials-over-algebraic-fields

 
I noticed that a factorization over algebraic fields is useless in Mathematica. Here is the example over the field containing I*Sqrt[3]: 
 
Pol=4 (3 I Sqrt[3] (-12 + 6 x - 4 x^2 + x^3) y^3 z + 
9 (12 -  ...
 

- asked by Aus Man (14 votes), answered by chyaong (11 votes)

4.30.1.3 RegionMeasure is wrong for simple 1D Path

https://mathematica.stackexchange.com/questions/153323/regionmeasure-is-wrong-for-simple-1d-path

 
Bug introduced in 11.1 
 
 
 
Take the simple path defined by a line through a set of points 
 
pts = {{0, 0}, {0, 1.5}, {0.05, 1.5}, {0.05, 0.5}, {0.1, 0.5}, {0.1,  1.5}, 
{0.15, 1.5}, {0.15, 0.5}, {0.2,  ...
 

- asked by Sascha (13 votes), answered by Michael E2 (8 votes)

4.30.1.4 Why am I seeing what looks like a violation of operator precedence?

https://mathematica.stackexchange.com/questions/153258/why-am-i-seeing-what-looks-like-a-violation-of-operator-precedence

 
Why is it that when I evaluate 
 
2*2.848529281693615`+3*-0.5155083247776808` 
 
 
I get 
 
(* -2.93688 *) 
 
 
which is wrong. 
 
2*2.848529281693615` + (3*-0.5155083247776808`) 
(* 4.15053 *) 
 
 
Any help would be  ...
 

- asked by An old man in the sea. (9 votes), answered by C. E. (9 votes)

4.30.1.5 Need a gentle introduction to stylesheet writing

https://mathematica.stackexchange.com/questions/153102/need-a-gentle-introduction-to-stylesheet-writing

 
I have searched Mathematica.SE for stylesheet and found a lot of useful information on specific issues but no general introduction. There were 746 hits, and it is very time consuming for anyone to  ...
 

- asked by m_goldberg (9 votes), answered by m_goldberg (7 votes)

4.30.1.6 Unexpected behavior when directly assigning to DownValues

https://mathematica.stackexchange.com/questions/152999/unexpected-behavior-when-directly-assigning-to-downvalues

 
I'm encountering some unexpected behavior when assigning to DownValues. When I assign two definitions for test[1] as below, Mathematica stores both definitions: 
 
DownValues[test] =  ...
 

- asked by tom (9 votes), answered by b3m2a1 (6 votes)

4.30.1.7 Except @ OptionsPattern[] affects OptionValue

https://mathematica.stackexchange.com/questions/152984/except-optionspattern-affects-optionvalue

 
The background 
 
This example works as expected, small function with a special case rule: 
 
foo // ClearAll 
foo // Options = {"bar" -> 1}; 
 
foo[x_, y : Except[_Rule], patt : OptionsPattern[] 
...
 

- asked by Kuba (9 votes), answered by Mr.Wizard (7 votes)