Reputation
29,683
Next tag badge:
474/400 score
65/80 answers
Badges
2 64 143
Newest
 Enlightened
Impact
~286k people reached

Feb
11
revised Most efficient way of splitting a file into length-prefixed blocks
deleted 45 characters in body
Feb
11
comment Most efficient way of splitting a file into length-prefixed blocks
No functional benefit, and not really a stylistic preference either. It is what came to mind first. I am not sure which I prefer. I think your last offer is my favourite
Feb
11
comment Nested mapping of a function
Are you certain that you want a neat version of the first construct? Honest question
Feb
11
comment Most efficient way of splitting a file into length-prefixed blocks
I thought of not answering because the OP asks for "most efficient". However, when I saw that a naive implementation worked x1.6 slower than a solution which is 200x faster than the OP's, I thought it might be useful anyway.
Feb
11
revised Most efficient way of splitting a file into length-prefixed blocks
added 28 characters in body
Feb
11
revised Most efficient way of splitting a file into length-prefixed blocks
added 28 characters in body
Feb
11
answered Most efficient way of splitting a file into length-prefixed blocks
Feb
9
comment How to split a Dataset into training and testing for machine learning?
@TaliesinBeynon that's neat, thanks! Nice to see you back around
Feb
8
comment Creating a TeXForm/TraditionalForm/etcForm - like function
They include the PrintForms which include the BoxForms. I did some digging at the time. Thanks! I think the output forms are those heads that end up showing applied to the cell label such as in mmaOut[34]//InputForm. Try Unprotect@$OutputForms;AppendTo[$OutputForms, la]; la[5]
Feb
1
comment Why Mathematica chooses bracket for function arguments over parenthesis?
@rm-rf A few days ago I did a rm * accidentally (I meant rm *.pdf) and lost about 15GB of stuff :)
Jan
26
awarded  Popular Question
Jan
26
comment What's real analogue for FromDigits?
What's the format of the input? If its a simple string, ToExpression or some Interpreter, or Internal`StringToDouble
Jan
26
comment Generating a Variable Number of Dynamic Variables
If for your application it might make sense to use p[1], p[2], ... instead of p1,p2, then all becomes easy
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
As to the extension, yes, you should round at the end with the min of the input precisions (or use SetPrecision perhaps) instead of using the automatic precision tracking of Mathematica. Because the Mathematica precision tracking does not work as you intend (but in a smarter way that makes sense in general)
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
Or, for that matter, 100``0 which doesn't require rounding up shows as 1.0*10^2
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
So, 54``0 with an error of 1 rounds to tens just like an error of 3.16 (54``-0.5). Both give 5.*10^1. But as you said, misteriously, when you get an extra digit by rounding up, it seems weird (even buggy?): 96``0 is 1.*10^2, 96``0.001 is 96. and 94``0 is 9.*10^1
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
In general, it seems the absolute error should be strictly smaller than the least significant display digit unit, so an accuracy of 0 (or error of 1) demands that the last digit displayed is "tens" (just as if the error was 9, 8 or 4). So the 0 accuracy is the borderline value. Try it with any number that doesn't get a new digit when rounding up, or that doesn't lose all significant digits getting 0 (both weird cases)
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
As to the display digits, there are some cases that confuse me, particularly when it has no digits to display and chooses to display 0.. Others really seem buggy, such as 96``0 displaying as 1.*10^2 instead of 1.0*10^2
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
As to 2.5`1*2.1`1 displaying 0 instead of a red output, also seems weird, but it is still a display problem only. It should give about 5.25 with a 40% uncertainty aprox (less precision than a significant digit)
Jan
20
revised OutputResponse and RecurrenceFilter failure in WM10 with increased precision datasets
edited title