Reputation
42,090
Next tag badge:
143/100 score
19/20 answers
Badges
8 119 217
Impact
~994k people reached

5m
comment Differentiation help
If in fact one wants the gradient: D[f[x, y, z], {{x, y, z}}]
1h
comment Numerically finding a single root of a polynomial system
"find a single root of a (multivariate) polynomial system" - if you have bounds on that root, you can certainly use NSolve[]
1h
revised Differentiation help
edited tags
4h
comment Simple exercise using the function Cases
Very interesting. Intuitively, I'd thought that Miller-Rabin is certainly more elaborate than computing a remainder, but I guess PrimeQ[] might actually be doing sonething else behind the scenes before Miller-Rabin kicks in, which might account for your observations.
7h
comment What kind of creature is h[c] for definition h[c_][x_] := (* function of x and c *)
@mgamer, both "Hero" and "Heron" are in fact acceptable; the same situation applies with his triangle area formula.
12h
comment Optimization of recursive functions by using the //. operator
For linear recurrences, matrix power-based methods are very efficient. Re: ReplaceRepeated[], I used it here instead of recursion.
12h
comment Simple exercise using the function Cases
Huh, that's very odd (yet another case of slow new functions?). What if the less idiomatic Mod[#, 3] == 0 & was used instead?
13h
comment How to delete subsets quickly?
@yohbs, you're right, seeing that the sorting will put the shorter lists first. Oh well…
13h
comment Combining lists to create points to plot with ListLinePlot
Yet another way: ListLinePlot[Select[Flatten[{distance, trial1}, {{2}, {1}}], Length[#] == 2 &]]
13h
comment Simple exercise using the function Cases
Addendum: for a sufficiently long list, exploiting the short-circuit property of Or[] can be helpful: test for divisibility by $3$ first, since it's the easier test, and invoke the primality test only if that fails. So, x_ /; Divisible[x, 3] || PrimeQ[x]
13h
comment How to delete subsets quickly?
I see. @yohbs, what if you use Union[] with an appropriate SameTest setting?
13h
comment Combination of interpolations doesn't work?
Good warning. In short: if your data is sufficiently contaminated with errors, direct application of finite differences will likely yield crap. You could try smoothing, but that is now a different kettle of fish…
13h
comment Simple exercise using the function Cases
I had Select[list, Divisible[#, 3] || PrimeQ[#] &] in mind, tho.
13h
revised How to delete subsets quickly?
edited tags
13h
comment How to delete subsets quickly?
Without sorting, how long does it take?
14h
comment Simple exercise using the function Cases
Select[] might be more straightforward for you.
15h
comment Undocumented function SumOfSquaresReps
"number of arguments etc." - as you can surmise from kglr's answer, it takes two arguments: Reduce`SumOfSquaresReps[k, n] returns all possible lists of k positive integers whose squares sum to n.
15h
comment Visualising a 1-(50,15,15) design
@Shutao, it's block design notation.
15h
reviewed Leave Open Remove color artifacts in overlay of several Graphics objects?
16h
comment Calculating expected value from paired values and weights
Equivalent: Dot @@ MapAt[Normalize[#, Total]&, Transpose[m], 2]