3203 "arc cosine" |
3232 "arc cosine" |
3204 |
3233 |
3205 |dVal| |
3234 |dVal| |
3206 |
3235 |
3207 dVal := nativeContext argAt:1. |
3236 dVal := nativeContext argAt:1. |
3208 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3237 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3209 dVal isReal ifTrue:[ |
3238 "/ dVal isReal ifTrue:[ |
3210 'JAVAVM [info]: missing double flag in Math>>acos' infoPrintCR. |
3239 "/ 'JAVAVM [info]: missing double flag in Math>>acos' infoPrintCR. |
3211 ] ifFalse:[ |
3240 "/ ] ifFalse:[ |
3212 self halt:'expected double arg' |
3241 "/ self halt:'expected double arg' |
3213 ] |
3242 "/ ] |
3214 ]. |
3243 "/ ]. |
3215 ^ dVal arcCos |
3244 ^ dVal arcCos |
3216 |
3245 |
3217 "Created: / 7.5.1998 / 00:34:50 / cg" |
3246 "Created: / 7.5.1998 / 00:34:50 / cg" |
3218 "Modified: / 4.11.1998 / 22:08:36 / cg" |
3247 "Modified: / 11.11.1998 / 15:08:20 / cg" |
3219 ! |
3248 ! |
3220 |
3249 |
3221 _Math_asin:nativeContext |
3250 _Math_asin:nativeContext |
3222 "arc sine" |
3251 "arc sine" |
3223 |
3252 |
3224 |dVal| |
3253 |dVal| |
3225 |
3254 |
3226 dVal := nativeContext argAt:1. |
3255 dVal := nativeContext argAt:1. |
3227 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3256 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3228 dVal isReal ifTrue:[ |
3257 "/ dVal isReal ifTrue:[ |
3229 'JAVAVM [info]: missing double flag in Math>>asin' infoPrintCR. |
3258 "/ 'JAVAVM [info]: missing double flag in Math>>asin' infoPrintCR. |
3230 ] ifFalse:[ |
3259 "/ ] ifFalse:[ |
3231 self halt:'expected double arg' |
3260 "/ self halt:'expected double arg' |
3232 ] |
3261 "/ ] |
3233 ]. |
3262 "/ ]. |
3234 ^ dVal arcSin |
3263 ^ dVal arcSin |
3235 |
3264 |
3236 "Created: / 7.5.1998 / 00:34:26 / cg" |
3265 "Created: / 7.5.1998 / 00:34:26 / cg" |
3237 "Modified: / 4.11.1998 / 22:08:48 / cg" |
3266 "Modified: / 11.11.1998 / 15:08:15 / cg" |
3238 ! |
3267 ! |
3239 |
3268 |
3240 _Math_atan:nativeContext |
3269 _Math_atan:nativeContext |
3241 "arc tangens" |
3270 "arc tangens" |
3242 |
3271 |
3243 |dVal| |
3272 |dVal| |
3244 |
3273 |
3245 dVal := nativeContext argAt:1. |
3274 dVal := nativeContext argAt:1. |
3246 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3275 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3247 dVal isReal ifTrue:[ |
3276 "/ dVal isReal ifTrue:[ |
3248 'JAVAVM [info]: missing double flag in Math>>atan' infoPrintCR. |
3277 "/ 'JAVAVM [info]: missing double flag in Math>>atan' infoPrintCR. |
3249 ] ifFalse:[ |
3278 "/ ] ifFalse:[ |
3250 self halt:'expected double arg' |
3279 "/ self halt:'expected double arg' |
3251 ] |
3280 "/ ] |
3252 ]. |
3281 "/ ]. |
3253 ^ dVal arcTan |
3282 ^ dVal arcTan |
3254 |
3283 |
3255 "Created: / 6.2.1998 / 01:24:12 / cg" |
3284 "Created: / 6.2.1998 / 01:24:12 / cg" |
3256 "Modified: / 4.11.1998 / 22:08:44 / cg" |
3285 "Modified: / 11.11.1998 / 15:08:11 / cg" |
3257 ! |
3286 ! |
3258 |
3287 |
3259 _Math_ceil:nativeContext |
3288 _Math_ceil:nativeContext |
3260 "ceiling" |
3289 "ceiling" |
3261 |
3290 |
3262 |dVal| |
3291 |dVal| |
3263 |
3292 |
3264 dVal := nativeContext argAt:1. |
3293 dVal := nativeContext argAt:1. |
3265 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3294 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3266 dVal isReal ifTrue:[ |
3295 "/ dVal isReal ifTrue:[ |
3267 'JAVAVM [info]: missing double flag in Math>>ceil' infoPrintCR. |
3296 "/ 'JAVAVM [info]: missing double flag in Math>>ceil' infoPrintCR. |
3268 ] ifFalse:[ |
3297 "/ ] ifFalse:[ |
3269 self halt:'expected double arg' |
3298 "/ self halt:'expected double arg' |
3270 ] |
3299 "/ ] |
3271 ]. |
3300 "/ ]. |
3272 ^ dVal ceilingAsFloat |
3301 ^ dVal ceilingAsFloat |
3273 |
3302 |
3274 "Created: / 7.1.1998 / 15:43:00 / cg" |
3303 "Created: / 7.1.1998 / 15:43:00 / cg" |
3275 "Modified: / 4.11.1998 / 22:08:59 / cg" |
3304 "Modified: / 11.11.1998 / 15:08:04 / cg" |
3276 ! |
3305 ! |
3277 |
3306 |
3278 _Math_cos:nativeContext |
3307 _Math_cos:nativeContext |
3279 "cosine" |
3308 "cosine" |
3280 |
3309 |
3281 |dVal| |
3310 |dVal| |
3282 |
3311 |
3283 dVal := nativeContext argAt:1. |
3312 dVal := nativeContext argAt:1. |
3284 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3313 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3285 dVal isReal ifTrue:[ |
3314 "/ dVal isReal ifTrue:[ |
3286 'JAVAVM [info]: missing double flag in Math>>cos' infoPrintCR. |
3315 "/ 'JAVAVM [info]: missing double flag in Math>>cos' infoPrintCR. |
3287 ] ifFalse:[ |
3316 "/ ] ifFalse:[ |
3288 self halt:'expected double arg' |
3317 "/ self halt:'expected double arg' |
3289 ] |
3318 "/ ] |
3290 ]. |
3319 "/ ]. |
3291 ^ dVal cos |
3320 ^ dVal cos |
3292 |
3321 |
3293 "Created: / 7.1.1998 / 15:41:30 / cg" |
3322 "Created: / 7.1.1998 / 15:41:30 / cg" |
3294 "Modified: / 4.11.1998 / 22:08:32 / cg" |
3323 "Modified: / 11.11.1998 / 15:07:59 / cg" |
3295 ! |
3324 ! |
3296 |
3325 |
3297 _Math_exp:nativeContext |
3326 _Math_exp:nativeContext |
3298 "exponential" |
3327 "exponential" |
3299 |
3328 |
3300 |dVal| |
3329 |dVal| |
3301 |
3330 |
3302 dVal := nativeContext argAt:1. |
3331 dVal := nativeContext argAt:1. |
3303 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3332 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3304 dVal isReal ifTrue:[ |
3333 "/ dVal isReal ifTrue:[ |
3305 'JAVAVM [info]: missing double flag in Math>>exp' infoPrintCR. |
3334 "/ 'JAVAVM [info]: missing double flag in Math>>exp' infoPrintCR. |
3306 ] ifFalse:[ |
3335 "/ ] ifFalse:[ |
3307 self halt:'expected double arg' |
3336 "/ self halt:'expected double arg' |
3308 ] |
3337 "/ ] |
3309 ]. |
3338 "/ ]. |
3310 ^ dVal exp |
3339 ^ dVal exp |
3311 |
3340 |
3312 "Created: / 7.5.1998 / 00:36:19 / cg" |
3341 "Created: / 7.5.1998 / 00:36:19 / cg" |
3313 "Modified: / 4.11.1998 / 22:09:05 / cg" |
3342 "Modified: / 11.11.1998 / 15:07:50 / cg" |
3314 ! |
3343 ! |
3315 |
3344 |
3316 _Math_floor:nativeContext |
3345 _Math_floor:nativeContext |
3317 "floor" |
3346 "floor" |
3318 |
3347 |
3319 |dVal| |
3348 |dVal| |
3320 |
3349 |
3321 dVal := nativeContext argAt:1. |
3350 dVal := nativeContext argAt:1. |
3322 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3351 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3323 dVal isReal ifTrue:[ |
3352 "/ dVal isReal ifTrue:[ |
3324 'JAVAVM [info]: missing double flag in Math>>floor' infoPrintCR. |
3353 "/ 'JAVAVM [info]: missing double flag in Math>>floor' infoPrintCR. |
3325 ] ifFalse:[ |
3354 "/ ] ifFalse:[ |
3326 self halt:'expected double arg' |
3355 "/ self halt:'expected double arg' |
3327 ] |
3356 "/ ] |
3328 ]. |
3357 "/ ]. |
3329 ^ dVal floorAsFloat |
3358 ^ dVal floorAsFloat |
3330 |
3359 |
3331 "Created: / 7.1.1998 / 19:09:21 / cg" |
3360 "Created: / 7.1.1998 / 19:09:21 / cg" |
3332 "Modified: / 4.11.1998 / 22:09:10 / cg" |
3361 "Modified: / 11.11.1998 / 15:07:45 / cg" |
3333 ! |
3362 ! |
3334 |
3363 |
3335 _Math_log:nativeContext |
3364 _Math_log:nativeContext |
3336 "logarithm" |
3365 "logarithm" |
3337 |
3366 |
3338 |dVal| |
3367 |dVal| |
3339 |
3368 |
3340 dVal := nativeContext argAt:1. |
3369 dVal := nativeContext argAt:1. |
3341 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3370 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3342 dVal isReal ifTrue:[ |
3371 "/ dVal isReal ifTrue:[ |
3343 'JAVAVM [info]: missing double flag in Math>>log' infoPrintCR. |
3372 "/ 'JAVAVM [info]: missing double flag in Math>>log' infoPrintCR. |
3344 ] ifFalse:[ |
3373 "/ ] ifFalse:[ |
3345 self halt:'expected double arg' |
3374 "/ self halt:'expected double arg' |
3346 ] |
3375 "/ ] |
3347 ]. |
3376 "/ ]. |
3348 ^ dVal log |
3377 ^ dVal log |
3349 |
3378 |
3350 "Created: / 7.1.1998 / 15:42:19 / cg" |
3379 "Created: / 7.1.1998 / 15:42:19 / cg" |
3351 "Modified: / 4.11.1998 / 22:09:16 / cg" |
3380 "Modified: / 11.11.1998 / 15:07:38 / cg" |
3352 ! |
3381 ! |
3353 |
3382 |
3354 _Math_pow:nativeContext |
3383 _Math_pow:nativeContext |
3355 "power" |
3384 "power" |
3356 |
3385 |
3357 |dVal1 dVal2| |
3386 |dVal1 dVal2| |
3358 |
3387 |
3359 dVal1 := nativeContext argAt:1. |
3388 dVal1 := nativeContext argAt:1. |
3360 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3389 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3361 dVal1 isReal ifTrue:[ |
3390 "/ dVal1 isReal ifTrue:[ |
3362 'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR. |
3391 "/ 'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR. |
3363 ] ifFalse:[ |
3392 "/ ] ifFalse:[ |
3364 self halt:'expected double arg' |
3393 "/ self halt:'expected double arg' |
3365 ] |
3394 "/ ] |
3366 ]. |
3395 "/ ]. |
3367 dVal2 := nativeContext argAt:3. |
3396 dVal2 := nativeContext argAt:3. |
3368 (nativeContext argAt:4) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3397 "/ (nativeContext argAt:4) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3369 dVal2 isReal ifTrue:[ |
3398 "/ dVal2 isReal ifTrue:[ |
3370 'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR. |
3399 "/ 'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR. |
3371 ] ifFalse:[ |
3400 "/ ] ifFalse:[ |
3372 self halt:'expected double arg' |
3401 "/ self halt:'expected double arg' |
3373 ] |
3402 "/ ] |
3374 ]. |
3403 "/ ]. |
3375 ^ dVal1 raisedTo:dVal2 |
3404 ^ dVal1 raisedTo:dVal2 |
3376 |
3405 |
3377 "Created: / 7.1.1998 / 15:44:13 / cg" |
3406 "Created: / 7.1.1998 / 15:44:13 / cg" |
3378 "Modified: / 4.11.1998 / 22:09:26 / cg" |
3407 "Modified: / 11.11.1998 / 15:07:33 / cg" |
3379 ! |
3408 ! |
3380 |
3409 |
3381 _Math_sin:nativeContext |
3410 _Math_sin:nativeContext |
3382 "sine" |
3411 "sine" |
3383 |
3412 |
3384 |dVal| |
3413 |dVal| |
3385 |
3414 |
3386 dVal := nativeContext argAt:1. |
3415 dVal := nativeContext argAt:1. |
3387 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3416 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3388 dVal isReal ifTrue:[ |
3417 "/ dVal isReal ifTrue:[ |
3389 'JAVAVM [info]: missing double flag in Math>>sin' infoPrintCR. |
3418 "/ 'JAVAVM [info]: missing double flag in Math>>sin' infoPrintCR. |
3390 ] ifFalse:[ |
3419 "/ ] ifFalse:[ |
3391 self halt:'expected double arg' |
3420 "/ self halt:'expected double arg' |
3392 ] |
3421 "/ ] |
3393 ]. |
3422 "/ ]. |
3394 ^ dVal sin |
3423 ^ dVal sin |
3395 |
3424 |
3396 "Created: / 7.1.1998 / 15:41:40 / cg" |
3425 "Created: / 7.1.1998 / 15:41:40 / cg" |
3397 "Modified: / 4.11.1998 / 22:09:30 / cg" |
3426 "Modified: / 11.11.1998 / 15:07:09 / cg" |
3398 ! |
3427 ! |
3399 |
3428 |
3400 _Math_sqrt:nativeContext |
3429 _Math_sqrt:nativeContext |
3401 "square root" |
3430 "square root" |
3402 |
3431 |
3403 |dVal| |
3432 |dVal| |
3404 |
3433 |
3405 dVal := nativeContext argAt:1. |
3434 dVal := nativeContext argAt:1. |
3406 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3435 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3407 dVal isReal ifTrue:[ |
3436 "/ dVal isReal ifTrue:[ |
3408 'JAVAVM [info]: missing double flag in Math>>sqrt' infoPrintCR. |
3437 "/ 'JAVAVM [info]: missing double flag in Math>>sqrt' infoPrintCR. |
3409 ] ifFalse:[ |
3438 "/ ] ifFalse:[ |
3410 self halt:'expected double arg' |
3439 "/ self halt:'expected double arg' |
3411 ] |
3440 "/ ] |
|
3441 "/ ]. |
|
3442 |
|
3443 "/ how about domain errors ? |
|
3444 dVal < 0 ifTrue:[ |
|
3445 "/ ^ 0.0 |
3412 ]. |
3446 ]. |
3413 ^ dVal sqrt |
3447 ^ dVal sqrt |
3414 |
3448 |
3415 "Created: / 7.1.1998 / 15:42:40 / cg" |
3449 "Created: / 7.1.1998 / 15:42:40 / cg" |
3416 "Modified: / 4.11.1998 / 22:09:35 / cg" |
3450 "Modified: / 11.11.1998 / 15:06:55 / cg" |
3417 ! |
3451 ! |
3418 |
3452 |
3419 _Math_tan:nativeContext |
3453 _Math_tan:nativeContext |
3420 "tangent" |
3454 "tangent" |
3421 |
3455 |
3422 |dVal| |
3456 |dVal| |
3423 |
3457 |
3424 dVal := nativeContext argAt:1. |
3458 dVal := nativeContext argAt:1. |
3425 (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3459 "/ (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[ |
3426 dVal isReal ifTrue:[ |
3460 "/ dVal isReal ifTrue:[ |
3427 'JAVAVM [info]: missing double flag in Math>>tan' infoPrintCR. |
3461 "/ 'JAVAVM [info]: missing double flag in Math>>tan' infoPrintCR. |
3428 ] ifFalse:[ |
3462 "/ ] ifFalse:[ |
3429 self halt:'expected double arg' |
3463 "/ self halt:'expected double arg' |
3430 ] |
3464 "/ ] |
3431 ]. |
3465 "/ ]. |
3432 ^ dVal tan |
3466 ^ dVal tan |
3433 |
3467 |
3434 "Created: / 7.5.1998 / 00:34:03 / cg" |
3468 "Created: / 7.5.1998 / 00:34:03 / cg" |
3435 "Modified: / 4.11.1998 / 22:09:40 / cg" |
3469 "Modified: / 11.11.1998 / 15:07:14 / cg" |
3436 ! |
3470 ! |
3437 |
3471 |
3438 _Method_getModifiers:nativeContext |
3472 _Method_getModifiers:nativeContext |
3439 |jMethod mthd retVal| |
3473 |jMethod mthd retVal| |
3440 |
3474 |