Can functions like sin() be redefined, in Fortran, C or Java?
        Posted  
        
            by 
                EOL
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by EOL
        
        
        
        Published on 2011-11-14T09:26:08Z
        Indexed on 
            2011/11/14
            9:51 UTC
        
        
        Read the original article
        Hit count: 268
        
Can a mathematical function like sin() be redefined, in Fortran, C or Java code, while preserving the default behavior of other mathematical functions like cos()?  Or can another function named sin() but that accepts different argument types be defined in addition to the built-in sin()?  I am interested in general features of these languages (I am thinking of applications like the implementation of non-usual number algebras).
I tried to define a sin() function in a Fortran 95 program, but the intrinsic sin() function was called instead…  Is there a way around this?  what about C and Java?
© Stack Overflow or respective owner