Reputation
3,486
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 14 49
Impact
~56k people reached

Feb
5
comment Length in Compile encounter “type Integer encountered in assignment of Type Real ”
@JasonB Thanks, Round works
Feb
5
comment Length in Compile encounter “type Integer encountered in assignment of Type Real ”
Thanks, Quotient works
Feb
5
accepted Length in Compile encounter “type Integer encountered in assignment of Type Real ”
Feb
5
asked Length in Compile encounter “type Integer encountered in assignment of Type Real ”
Feb
5
comment Why Plot3D shows differently with almost the same data
The chat history is here chat.stackexchange.com/transcript/message/27047477#27047477 and I have found the "bug" line which is quite normal, I discussed it here chat.stackexchange.com/transcript/message/27356527#27356527
Feb
5
comment Why Plot3D shows differently with almost the same data
And there is still mysteries in this topic. If you are interested in this, you have another interesting bug to catch : ) Have you read this mathematica.stackexchange.com/q/104382/4742 ? halirutan came up with very clever method to make any librarylink function Listable like Compile function. I successfully tested many librarylink, all works, except this one in the post. The problem is that if I make funcfortran listable, it will get different answers each evaluation.
Feb
5
comment Why Plot3D shows differently with almost the same data
currently, I can only deal with intel compiler in windows and gcc in linux. I wish I could also done this with mingw in windows, in case of that I don't have a intel compiler. But I don't know how to include gfortran lib of mingw in win. I have asked a question, mathematica.stackexchange.com/questions/104668/… the sad thing is, they close it!! They thought this is too specific. So I don't know if you can open the link or not?
Feb
5
comment Why Plot3D shows differently with almost the same data
I am very glad I could show this to you : ) I packed the sample as a zip here 1drv.ms/23MsJt5 The .nb file is written with instruction, hope I make myself clear, if you have any problem, drop me a comment. But I have to say, I haven't completely mastered this technique.
Feb
4
awarded  Popular Question
Feb
4
awarded  Benefactor
Feb
4
comment Why Plot3D shows differently with almost the same data
I thought as soon as a accept your answer, the 200 will automatically pass to you. I just know that it is not. Anyway, I just click on the bounty button, enjoy : )
Feb
2
revised Why Plot3D shows differently with almost the same data
deleted 8 characters in body
Feb
2
revised Why Plot3D shows differently with almost the same data
added 612 characters in body
Feb
2
accepted Why Plot3D shows differently with almost the same data
Feb
2
comment Why Plot3D shows differently with almost the same data
I got the bug!!! Just like you said, fortran is doing rounding there, it is due to cmplx(w,wdelta) in my fortran code, I should use dcmplx(w,wdelta)! Thank you Jason B. You are an excellent bug hunter! : )
Feb
2
comment Why Plot3D shows differently with almost the same data
Oh, I just notice you've already mentioned in your modified post. w is suspicious, let me check that
Feb
2
comment Why Plot3D shows differently with almost the same data
That is a good idea, and I have confirmed my native fortran code already have this problem. What is more, even I remove the if branch in my code, it also produce the steps!! Damn! What on earth are they? Do you have any clever guesses? : )
Feb
1
comment Why Plot3D shows differently with almost the same data
But definitely a +1 first : )
Feb
1
comment Why Plot3D shows differently with almost the same data
I really appreciate your help : ) I just checked my fortran source several time again, still finding nothing. I will check further, for they are actually not exactly the same, though I personally believe that should not matter that much. Now I am not quite sure whether it is a problem of my source or a problem of mixing C process, or a problem of librarlylink. So I am not that optimistic, maybe I need another person to shed some light on my fortran and C source too : )
Feb
1
comment Why Plot3D shows differently with almost the same data
That is convincing finding. The two functions are so similar, I thought they should be the same, problem maybe due to plot3d. While it turn out that they are "drastically" different now. I have to recheck my fortran source.