JavaMathSupport.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 Jan 2013 16:32:33 +0000
branchrefactoring-vmdata
changeset 1967 cc28bbc7c624
parent 1864 60a8dc26c8c6
child 2069 75d40b7b986f
permissions -rw-r--r--
Updated from branch development
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     1
"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
     3
1155
vranyj1
parents: 1152
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
     5
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     8
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    14
 hereby transferred.
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    15
1155
vranyj1
parents: 1152
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
vranyj1
parents: 1152
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
vranyj1
parents: 1152
diff changeset
    18
     see the differences between this version and version stx:libjava
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
    19
     as of 1.9.2010
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    20
"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    22
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    23
Object subclass:#JavaMathSupport
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:''
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Support-Native'
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    28
!
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    29
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    30
!JavaMathSupport class methodsFor:'documentation'!
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    31
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    32
copyright
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    33
"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
    35
1155
vranyj1
parents: 1152
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
    37
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    40
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    46
 hereby transferred.
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    47
1155
vranyj1
parents: 1152
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
vranyj1
parents: 1152
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
vranyj1
parents: 1152
diff changeset
    50
     see the differences between this version and version stx:libjava
1152
040cba55a7d2 Copyright fixes
vranyj1
parents: 990
diff changeset
    51
     as of 1.9.2010
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    52
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    53
"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    54
! !
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    55
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    56
!JavaMathSupport class methodsFor:'java-style FP functions'!
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    57
990
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    58
cos:f
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    59
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    60
%{
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    61
	RETURN ( _MKFLOAT( jcos ( __floatVal ( f ) ) ) );
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    62
%}
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    63
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    64
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    65
    "Created: / 07-09-2011 / 17:34:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    66
!
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    67
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    68
cosh: f
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    69
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    70
%{
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    71
	RETURN ( _MKFLOAT( jcosh ( __floatVal ( f ) ) ) );
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    72
%}
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    73
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    74
    "Created: / 07-09-2011 / 17:08:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    75
!
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
    76
990
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    77
expm1:f
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    78
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    79
%{
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    80
	RETURN ( _MKFLOAT( jexpm1 ( __floatVal ( f ) ) ) );
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    81
%}
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    82
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    83
    "Created: / 07-09-2011 / 17:34:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    84
!
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    85
990
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    86
floor:f
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    87
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    88
%{
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    89
	RETURN ( _MKFLOAT( jfloor ( __floatVal ( f ) ) ) );
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    90
%}
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    91
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    92
    "Created: / 07-09-2011 / 17:33:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    93
!
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
    94
990
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    95
sin:f
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    96
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    97
%{
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    98
	RETURN ( _MKFLOAT( jsin ( __floatVal ( f ) ) ) );
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
    99
%}
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   100
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   101
    "Created: / 07-09-2011 / 17:32:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   102
!
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   103
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   104
sinh: f
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   105
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   106
%{
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   107
	RETURN ( _MKFLOAT( jsinh ( __floatVal ( f ) ) ) );
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   108
%}
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   109
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   110
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   111
    "Created: / 07-09-2011 / 17:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   112
!
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   113
990
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   114
tanh:f
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   115
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   116
%{
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   117
	RETURN ( _MKFLOAT( jtanh ( __floatVal ( f ) ) ) );
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   118
%}
5e4818e67471 Build files fixed, JavaMathSupport improved
vranyj1
parents: 988
diff changeset
   119
988
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   120
414a2c9a6a9e Java-style FP math natives and support methods
vranyj1
parents: 987
diff changeset
   121
    "Created: / 07-09-2011 / 17:32:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   122
! !
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   123
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   124
!JavaMathSupport class methodsFor:'documentation'!
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   125
1864
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   126
version_HG
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   127
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   128
    ^ '$Changeset: <not expanded> $'
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   129
!
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   130
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   131
version_SVN
1864
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   132
    ^ '§Id§'
987
7ce13ad78d68 - build targets for building fdlibm
vranyj1
parents:
diff changeset
   133
! !