All code in my contributions on Mathematica.SE, unless otherwise specified, is dual-licensed under CC-by-SA 3.0 and your choice of any one of the following:

7m
reviewed Close How to solve first order nonlinear coupled ODE's and obtaining the solution in function form
8m
reviewed Close Unexpected result when using PlotRange in Mathematica 10
8m
reviewed Close What does the error "Recursion depth ... exceeded" mean?
8m
reviewed Close Plotting function
11m
reviewed Close How to remove box around "More Information" section in documentation Symbol Page generated by Workbench
11m
reviewed Close How to add horizontal, strecthed curly brace to plot?
12m
comment FeynRules issue when trying to export UFO file
Well, I suppose it's a bug in FeynRules that results in generating incorrect Python code. But, I've never used this package, and I suppose a majority of other users of this site will be in the same situation. You might be better off to contact the authors of the package.
22m
comment Changing the definition of N: unexpected $RecursionLimit::reclim error
The Trace is not very enlightening, but I think this may have to do with the recursive behavior of N. When called on any expression, it applies itself to the parts first (and the parts of the parts, &c.) in an effort to numericize the whole. Here it seems that it gets stuck while repeatedly trying to numericize the second argument. Possibly a bug in N? By the way, a better pattern is Object /: Verbatim[N][Object[arg1_, arg2_, argRest__], Narg : _ | PatternSequence[]] := Object[arg1, N[arg2, Narg], argRest]. This handles the argument of N correctly.
46m
comment Changing the definition of N: unexpected $RecursionLimit::reclim error
Object /: Verbatim[N][Object[arg1_, arg2_, argRest__]] := Object[arg1, N[arg2], argRest]
1h
comment Generating Random Real numbers with certain numbers not included
The question does not specify anything about integers specifically, just "numbers equal to 3"--and, anyway, you seem to be intent on interpreting the putative restriction to integers as referring to data type rather than numerical value. In some narrow sense, I do agree, you are correct in what you say. Unfortunately, I fear that this sense has little or perhaps nothing to do with the question the OP actually asks.
1h
comment Generating Random Real numbers with certain numbers not included
data = RandomReal[{1.99999999, 2.00000001}, 10^8]; MemberQ[data, 2.] (* -> True *)
1h
comment Generating Random Real numbers with certain numbers not included
The OP clearly states that they do not want numbers "equal to 3" in the result. Integers are a subset of the reals and 3 is equal to 3.0 (but it is not a pattern match in Mathematica, as you surely know). You are obviously correct if Mathematica really draws from a uniform distribution over the reals, but given that (like every other computer system) it does this only using the approximation of floating point arithmetic, then either your answer is wishful thinking, or your math is faulty.
3h
comment Generating Random Real numbers with certain numbers not included
But perhaps there is a 2.0. Yes, the real number 2 is actually thought of by Mathematica as a uniform distribution having width 3 $MachineEpsilon, and yes, "equality" is not really defined for distributions, but this is a unique oddity (some would say perversion) of Mathematica and probably not what the OP is asking about. Practically speaking, the calculation is done over a finite set of rationals, not reals or distributions or anything else.
5h
comment Generating Random Real numbers with certain numbers not included
@belisarius $MachineEpsilon is normalized to 1, i.e. it's a relative, not an absolute, difference. There do exist plenty of valid FP numbers smaller than it, but not any two that vary by a fraction less than it.
5h
comment Generating Random Real numbers with certain numbers not included
Amusingly(?), SetPrecision[Union@RandomVariate[UniformDistribution[{1.-$MachineEpsilon,1.}],100],Infinity] shows that Mathematica also does not seem to be quite sure which definition of $\epsilon$ it wants to use--is it 1/2 ULP (LAPACK convention), or 1 ULP (ISO C convention)?
5h
comment Generating Random Real numbers with certain numbers not included
@belisarius I don't follow? Anyway, reading this answer more carefully, I see that (i.e., the error shows that) Andy (or whoever else wrote or helped to write these) has been bitten by Internal`$EqualTolerance and friends. These are sufficiently obscure that it wouldn't surprise me at all that there is at least one person working at WRI who is writing numerical code and doesn't know what they do, or considers it an irrelevant corner case.
6h
comment Generating Random Real numbers with certain numbers not included
I didn't check this or even look too hard at this question/answers. But, it should be 3*(1 - $MachineEpsilon) and 3*(1 + $MachineEpsilon), not as written in belisarius's answer. After that, it should work correctly (if there are no FP bugs in the distribution implementations, &c.).
2d
comment How to obtain the best possibe NonlinearFit
NonlinearModelFit calls FindFit internally to do the fitting. It then wraps the result in such a way as to make it easy to obtain detailed properties of the fit such as the covariance matrix, rather than only the optimized values of the coefficients. If you don't need the additional information, FindFit does the job a bit faster, and also takes the option NormFunction, which is not supported by NonlinearModelFit as some of the properties are calculated assuming that the fit is done according to the 2-norm.
Nov
22
awarded Necromancer
Oct
3
awarded Enlightened
1 2 3 4 5