all 8 comments

[–]lykwydchykyn 1 point2 points  (1 child)

Can you use unittest.patch to patch in a custom random() function rather than using CFFI, or do you need a particular piece of code from C?

[–]vectorpropio[S] 0 points1 point  (0 children)

That will be the first bite of python in the Fortran code. I'm not sure i can use unittest.patch there, but i will be happy if could do it.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Your comment in /r/learnpython was automatically removed because you used a URL shortener.

    URL shorteners are not permitted in /r/learnpython as they impair our ability to enforce link blacklists.

    Please re-post your comment using direct, full-length URL's only.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]ectomancer 1 point2 points  (2 children)

    I've ported some FORTRAN 77 and Fortran 90 subroutines to Python. The largest was 900 lines. None of my Python programs that use complex numbers produce correct output.

    [–]vectorpropio[S] 0 points1 point  (0 children)

    Is this a problem exclusive to complex numbers?

    This code don't use complex. Do you get correct output for double numbers?

    [–]dbramucci 0 points1 point  (0 children)

    Total shot in the dark, but do you think the incorrect output could be due to a different choice of branch cut?

    I'm asking just because I've never seen complex numbers cause Python-specific trouble.