« first day (2285 days earlier)      last day (2200 days later) » 

2:57 AM
Has someone experience with mod for floating point numbers? Assume the simple example for integers, where calculate mod 2:
Table[{x, Mod[x, 2]}, {x, 0, 20, 1}] // ListLinePlot
Looks as expected. On real data with finite precision, this doesn't work. Let us scale everything with 0.1
Table[{x, Mod[x, .2]}, {x, 0, 5, .1}] // ListLinePlot
 
 
5 hours later…
8:19 AM
@halirutan: Compare NumberForm[BaseForm[0.2, 2], 53] with NumberForm[BaseForm[0.2, 2], {60, 60}]
the issue has to do with the fact that 0.2 has no finite representation in binary
 
 
1 hour later…
9:46 AM
What confuses me a bit is that Mod[1,0.2]<0.2 is False which is not supposed to happen according to the documentation
 
10:08 AM
Just noticed that I posted the wrong expression above - what I meant to write for the second expression is NumberForm[BaseForm[Mod[1,0.2], 2], 53]
 
10:24 AM
@Mathe172 Sorry, it was already very early morning and I had to sleep. Why this happens is clear to me. The question (that I forgot) is, why is this not accounted for? If you look at
Table[{x, Last[QuotientRemainder[x, .2]]}, {x, 0, 5, .1}] // ListLinePlot
you see that this gives the right answer. This function must do some more involved computation.
Btw, the same behavior of Mod can be found when you write a real C program with fmod.
 
 
1 hour later…
11:44 AM
@halirutan: C is more correct: see here - at least here fmod(1.0,0.2)<0.2==true
 
12:01 PM
@Mathe172 Yeah, I had a similar C snippet..
 
12:37 PM
@b3m2a1 I would like to update the install instructions for my packages to use your paclet server, one everything settles down. Do let me know when you consider it stable enough. One thing to change is to update the URLs after the name change (which was a good idea—a short name like "palclets" is better)
@b3m2a1 Could you tell me more about how to add extra metadata without putting non-standard things in the PacletInfo file?
 
 
2 hours later…
2:16 PM
Is anyone else experiencing major lag spikes in 11.3 when typing ` as part of a symbol name? This happens only the first time, so I assume MMA is looking for things to autocomplete in the typed context (this is on Windows 10)
 
@Mathe172 In JLink this happens as well. The method-names are looked up.
 
@halirutan it just seems strange that it is so slow, especially compared to 11.2 and to something like ?context`*, which finishes a lot faster on the same context
 
 
4 hours later…
6:36 PM
@Mathe172 @halirutan Try Block[{Internal`$EqualTolerance = 0}, Mod[1, 0.2] < 0.2]
Related Q&A: (48810), (87821), (132890)
 

« first day (2285 days earlier)      last day (2200 days later) »