Wolfram Mathematica

Welcome! This is the main Mathematica chat room for mathematic...
Dec 29, 2020 18:13
@b3m2a1 Yes, I'm doing well, thanks. Personally I've been mercifully unaffected so far. Not thinking about/using Mathematica much these days, though
Dec 29, 2020 18:11
Hello everyone. I hope you're all doing well at the end of this terrible year
3
Dec 18, 2017 23:35
Hello everyone! Hope you're all as happy and healthy as ever! Merry Christmas!
Aug 24, 2017 21:06
Hello everyone! Long time, no login. Glad to see that this is still the best site on StackExchange!
4
Apr 10, 2017 19:55
I can only assume that at 70 years of age RJF has decided to spend his time doing something else
Apr 10, 2017 19:54
@Szabolcs I remember it well! Actually I read MathGroup for a long time before getting the courage to make my first post, because I really did not want to be sucked into this kind of flame war.
Apr 10, 2017 19:37
However: Uncompress["1:eJxTTMoPKmIAgx//ARU8A64="] still gives Indeterminate!
Apr 10, 2017 19:32
@Szabolcs ah! Very interesting. It makes sense actually: Mma must be relying on NaN values to trap for it to replace them with Indeterminate
Apr 9, 2017 20:28
But of course you have to feed this using a method that won't mind having null bytes in the input
Apr 9, 2017 20:28
Incidentally you can use the method 4 compression to not have to bother with the zlib and base64 as far back as version 9
Apr 9, 2017 20:23
Of course this is not to say that Uncompress and MathLink are doing the same thing. Maybe Uncompress is more thorough in its checking for NaN
Apr 9, 2017 20:21
It seems to accept all NaNs without complaint
Apr 9, 2017 20:16
@Szabolcs I made a NaN with some bits randomly flipped and Uncompress still changed to Indeterminate
Apr 9, 2017 20:09
(anything except zero or it will be an Inf)
Apr 9, 2017 20:08
To put it briefly: for a NaN the exponent field is all 1's, the sign bit is 0 for signaling or 1 for quiet, and the significand can be anything
Apr 9, 2017 20:06
This is interesting. There is more than one valid IEEE754 NaN value. Possibly Mma only checks for a subset of these
Apr 9, 2017 20:05
But if you chose to generate the compressed form of the array and pass that back through MathLink, it seems that it might deal with it automatically
Apr 9, 2017 20:03
@Szabolcs yes, I understand. I was just curious as to whether it is possible to get the NaN into the system in any other way apart from MathLink. Apparently not.
Apr 9, 2017 18:02
@Szabolcs I wondered, what will Mma do if fed a raw IEEE754 NaN in a compressed string? Result: Uncompress["1:eJxTTMoPKmIAgx/1ABS8Ay4="] gives Indeterminate
Mar 31, 2017 20:46
@Szabolcs the performance penalty for unaligned access is highly dependent on the CPU. For Itanium unaligned access could be hundreds or even thousands of times slower. For x86 they try to eliminate the disparity for more and more complex operations with each new CPU design. Yours is a new CPU so I would assume the operation is based on AVX2, which requires 32-byte alignment (due to 256-bit execution units). OSes/C runtimes got wise to the need for 16-byte alignment already, but maybe not 32
Mar 31, 2017 20:29
well at least he might be in a position to test it
Mar 31, 2017 20:28
@Szabolcs oh yes, so I see
Mar 31, 2017 20:14
@Szabolcs sorry for the delayed response. You discovered something really weird. My guess: alignment issues. This is really important for vectorized operations (I mean using vector CPU instructions). Alignment needs to be to a 16-byte boundary for best performance. Can be that Mathematica just allocates the arrays without much consideration for alignment. Unfortunately, it will be really hard to test this.
Mar 26, 2017 11:21
@P.Fonseca that is absolutely great! What a slick site
Mar 25, 2017 15:12
@MapleSE-Area51Proposal have you seen this one? mathematica.stackexchange.com/questions/41682/…
Mar 25, 2017 12:16
@xzczd it's a good question! I don't know the answer though. This seems to go against my understanding of the function. Interestingly they only compare equal if the tolerance is 8 or more digits. This seems excessive. It could have something to do with the difference between e.g. SetPrecision[1.1, Infinity] and SetPrecision[1.1`2, Infinity]? I actually don't know how finite-precision numbers are stored internally
Mar 25, 2017 11:23
@Szabolcs Good luck. For me it was just sheer luck that the right thing came along at (nearly) the right time, and it's even close to where I was before geographically. I'd already decided I wouldn't pursue an academic career after seeing too many of my friends subject to such career uncertainty as a resulty
Mar 25, 2017 11:16
@Szabolcs Industry. I quit my postdoc 1 year early leaving the project unfinished, which I wasn't entirely happy about. But on the other hand this is the perfect job for me, almost identical to what I was doing during my postdoc. So now I get to be a postdoc for the rest of my career! :)
Mar 25, 2017 11:14
Good to see that the site is in good shape and congratulations @Kuba on the moderatorship
Mar 25, 2017 11:14
@Szabolcs yes indeed! I started a new job back in October and have been kept so busy (and without a licence of Mma!) that I haven't been able to find much time/motivation to visit
May 25, 2016 09:50
So, it seems that Tr does something special, or it's just someone's mistake not to handle it properly. I don't know if you will get any useful response if you raise this with support.
May 25, 2016 09:49
@blochwave what is even stranger, is that Tr is handled using the opcode 47 mechanism (supposed to be a jump straight to the entry point of the function code, no top-level interpretation, still fast). But unlike all other functions handled this way, the second part of the instruction contains not the function's name Tr but rather Tr[#1] &. This is like the normal and slow opcode 46 which copies data out of the VM into top-level symbols and invokes the full evaluator.
May 25, 2016 09:41
@blochwave yes, I think you should certainly update it to mention that Tr is not compilable even though it appears in the list--well noticed. On the other hand, the information Jagra was given by support is indisputably wrong. I think that the appearance of Tr in the list (or the compiler's lack of support for Tr) may be a bug.
Apr 12, 2016 03:17
@halirutan given the XLS format, MSXL probably does use all doubles internally.
Apr 12, 2016 03:13
In the XLS file format (42MB specification document), all numbers are indeed stored as doubles. (See section 2.4.180.)
Apr 12, 2016 03:06
@P.Fonseca I commented about this under Wolfgang's answer. I don't know what Excel does internally, but the XLSX format itself certainly doesn't suggest that everything's stored as a double. Maybe if WRI thought that Excel always uses doubles then they will as well, although maybe this is not a great strategy since Excel is numerically crap and other programs might use the same file format without suffering the same numerical problems.
Apr 11, 2016 02:35
@William since biology is rather a practical discipline (run a PCR, make a western blot, do a fluorescence assay, perform surgery on a mouse...) I believe the best answer is "hire a postdoc" (Ph.D. student if you're daring)
Mar 13, 2016 20:36
@acl hello. Nice to see you back in the chat again. Been keeping busy?
Mar 2, 2016 16:42
@kirma @Szabolcs I just got the update email about 5 mins ago. The new features look quite nice for a point release
Feb 15, 2016 16:08
@Szabolcs I'm sorry, I don't think I can be of any help. I haven't any experience with C++ at all, really
 

 LibraryLink & MathLink

chat about LibraryLink, MathLink and extending Mathematica wit...
May 11, 2016 13:16
@Szabolcs Hm, I didn't know that any operators work on them except Equal, which seems to just perform a test for identity, not actually numerical equality? Maybe it changed in version 10. I think they're potentially useful for passing objects around that may be subject to casting, apart from the scenario you describe. It can be helpful for bit manipulations, maybe.
May 11, 2016 12:13
@Szabolcs sounds quite useful. I haven't tried it though
 

 Electrical Engineering

A place to talk with friends from the EE community about vacuu...
Feb 13, 2016 21:32
@PlasmaHH then I consider my mission a success. :)
Feb 13, 2016 21:31
@PlasmaHH yes, you're right. And, who knows, maybe I will be interested in longer pulses in the future. (I am a physicist, not EE. This is not to drive a motor or something but to perturb a plasma.)
Feb 13, 2016 21:26
@PlasmaHH as it happens I'm not really concerned with long pulses anyway. This is really just a curiosity for me, so I could ignore it and there would be no problem in the application. Only pulse widths of less than 100ns are interesting in reality.
Feb 13, 2016 21:16
@Asmyldof yes, I appreciate that. I asked in here just in case someone had an idea what may cause this in an otherwise properly working circuit. Of course if I ask on the site then I will provide complete information. Actually I now wonder if C_oss increase with falling V_DS (due to bulk capacitance discharge) is causing a new resonance to appear. I will check this.
Feb 13, 2016 21:10
@Asmyldof worth a try. Thanks.
Feb 13, 2016 21:06
@Asmyldof I know. It charges and stays charged. Immediately before the oscillation begins there has been no significant change in V_GS since the beginning of the on-time.
Feb 13, 2016 21:03
@Asmyldof okay, I see what you mean. I had misunderstood your question. During the oscillation I haven't closely examined V_GS because V_S is wildly varying. Before the oscillations start, there is no significant change in V_GS.
Feb 13, 2016 21:01
@Asmyldof V_GS. V_S and V_G fall together a bit because of limited bulk capacitance depending on the load.