« first day (2001 days earlier)      last day (2781 days later) » 

00:11
@MichaelHale That's nice!
 
9 hours later…
09:14
quick question.
How do I open multiple sessions of Mathematica in Mac?
 
4 hours later…
14:04
Is it possible to set the precision of a function? Like an attribute or someting? That is make all of the calculations in a function use a certain precision. I would like this to be 2 $MachinePrecision for a function I have defined that takes multiple variables.
14:23
@Edmund - would something like myfunc[args__] := Block[ {$MinPrecision = 2 $MachinePrecision}, func ] work?
15:14
@Edmund Might want to set $MaxPrecision, too, since normally the precision of a result can be higher or lower than the inputs.
Examples: mathematica.stackexchange.com/…, for instance,
9
A: A problem about fixed point iteration theory

RunnyKineA nice trick to force Mathematica to use a given precision is to use Block and make $MinPrecision equal to $MaxPrecision. So you can write your result1 as: Block[{$MinPrecision = 10, $MaxPrecision = 10}, FixedPointList[N[1/2 Sqrt[10 - #^3] &, 10], 1.5`10]] {1.500000000, 1.286953768,...

@JasonB That does not work. I still get MachinePrecision output.
@MichaelE2 Setting both min and max does not seem to do the trick either.
I will post a question.
15:49
@Edmund You have to avoid MachinePrecision numbers in your calculation. The precision tracking controlled by $MinPrecision/$MaxPrecision applies only to arbitrary precision numbers (not to machine precision or infinite precision), I think. A machine precision component "demotes" the whole calculation to machine precision.
16:47
@MichaelE2 Humm. Just posted a question on this
0
Q: How to set the Precision for a function?

EdmundFrom this answer (19542) to my question I need to add the WorkingPrecision option to RandomVariate for that particular ProbabilityDistribution not to experience what I guess is an overflow off some sort and return incorrect values. Another option given by WRI was to use Rationalize[ #, 0]& on ea...


« first day (2001 days earlier)      last day (2781 days later) »