Overview
1°) Multiplication
a) Program#1
b) Program#2
2°) Reciprocal
3°) Exponential
a) Program#1
b) Program#2
4°) Logarithm
5°) Raising an Sedenion to a Power
a) Real Exponent
b) Sedenion Exponent
6°) Hyperbolic Functions
a) Sinh S
b) Cosh S
c) Tanh S
7°) Inverse Hyperbolic Functions
a) ArcSinh S
b) ArcCosh S
c) ArcTanh S
8°) Trigonometric Functions
a) Sin S
b) Cos S
c) Tan S
9°) Inverse Trigonometric Functions
a) ArcSin S
b) ArcCos S
c) ArcTan S
10°) Sedenionic Equations
1°) Multiplication of 2 Sedenions
a)
Program#1
-An sedenion is an element x0 + x1 e1 + ..... + x15 e15 of S = R16 where ( 1 , e1 , ............. , e15 ) is the standard basis.
-Addition and subtraction are defined like ordinary vectors, but the
multiplication is much more complex:
-Sedenions may be regarded as pairs of octonions and the product is
defined by
( a , b ) ( c
, d ) = ( a c - d* b , d a + b c* )
"Cayley-Dickson doubling"
where * = conjugate
Data Registers: R00 is unused ( Registers R17 thru R48 are to be initialized before executing "SS1" )
>>>> When the program stops, R01 to R16 = the 16 components of S.S'
• R17 to R32 = the 16 components of the first sedenion S
• R33 to R48 = the 16 components of the second sedenion S'
R49 to R72: temp
Flags: /
Subroutine: "O*O" ( cf "Octonions
for the HP-41" )
01 LBL "SS1"
02 17.009008 03 REGMOVE 04 .056 05 + 06 REGMOVE 07 33.017008 08 REGMOVE 09 XEQ "O*O" 10 1.049008 11 REGMOVE 12 24.017 13 SIGN |
14 CHS
15 LBL 01 16 ST* IND L 17 DSE L 18 GTO 01 19 25.009008 20 REGMOVE 21 XEQ "O*O" 22 1.057008 23 REGMOVE 24 41.009008 25 REGMOVE 26 65.017008 |
27 REGMOVE
28 XEQ "O*O" 29 64 30 8 31 LBL 02 32 RCL IND X 33 ST+ IND Z 34 RDN 35 DSE Y 36 DSE X 37 GTO 02 38 25.017008 39 REGMOVE |
40 SIGN
41 CHS 42 ST* 09 43 XEQ "O*O" 44 56 45 8 46 LBL 03 47 RCL IND X 48 ST+ IND Z 49 RDN 50 DSE Y 51 DSE X 52 GTO 03 |
53 49.001016
54 REGMOVE 55 65.017008 56 REGMOVE 57 RCL 04 58 RCL 03 59 RCL 02 60 RCL 01 61 END |
( 200 bytes / SIZE 073 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 2 + 4 e1 + 9 e2 + 3 e3
+ 5 e4 + 7 e5 + 8 e6 + 2 e7
+ 6 e8 + 4 e9 + 3 e10 + 2 e11
+ 9 e12 + 7 e13 + 6 e14 + 8 e15
S' = 9 + 2 e1 + 4 e2 + 7 e3
+ 3 e4 + 2 e5 + 6 e6 + 5 e7
+ 4 e8 + 2 e9 + 6 e10 + 9 e11
+ 3 e12 + 6 e13 + 5 e14 + 7 e15
2 STO 17
5 STO 21
6 STO 25 9
STO 29
9 STO 33 3 STO 37
4 STO 41 3 STO 45
4 STO 18
7 STO 22
4 STO 26 7
STO 30
2 STO 34 2 STO 38
2 STO 42 6 STO 46
9 STO 19
8 STO 23
3 STO 27 6
STO 31
4 STO 35 6 STO 39
6 STO 43 5 STO 47
3 STO 20
2 STO 24
2 STO 28 8
STO 32
7 STO 36 5 STO 40
9 STO 44 7 STO 48
XEQ "SS1" >>>> -357 = R01
---Execution time = 42s---
RDN 2 = R02
RDN 132 = R03
RDN 20 = R04
and
R05 = -53 , R06 = 25 , R07 = 138 , R08 = 101 , R09 = 13 , R10 = -10 , R11 = 12 , R12 = -43 , R13 = 41 , R14 = 216 , R15 = -28 , R16 = 183
whence
S.S' = - 357 + 2 e1 + 132 e2 + 20 e3 - 53 e4 + 25 e5 + 138 e6 + 101 e7 + 13 e8 - 10 e9 + 12 e10 - 43 e11 + 41 e12 + 216 e13 - 28 e14 + 183 e15
Notes:
-"SS1" uses registers R49 thru R72 which may be avoided with the following
program.
-But "S*S" is unfortunately much longer !
b)
Program#2
-This variant calculates directly the 16 components of the product.
-"S*S" employs the following multiplication table:
S \ S' | 1 | e1 | e2 | e3 | e4 | e5 | e6 | e7 | e8 | e9 | e10 | e11 | e12 | e13 | e14 | e15 |
1 | 1 | e1 | e2 | e3 | e4 | e5 | e6 | e7 | e8 | e9 | e10 | e11 | e12 | e13 | e14 | e15 |
e1 | e1 | -1 | e3 | -e2 | e5 | -e4 | -e7 | e6 | e9 | -e8 | -e11 | e10 | -e13 | e12 | e15 | -e14 |
e2 | e2 | -e3 | -1 | e1 | e6 | e7 | -e4 | -e5 | e10 | e11 | -e8 | -e9 | -e14 | -e15 | e12 | e13 |
e3 | e3 | e2 | -e1 | -1 | e7 | -e6 | e5 | -e4 | e11 | -e10 | e9 | -e8 | -e15 | e14 | -e13 | e12 |
e4 | e4 | -e5 | -e6 | -e7 | -1 | e1 | e2 | e3 | e12 | e13 | e14 | e15 | -e8 | -e9 | -e10 | -e11 |
e5 | e5 | e4 | -e7 | e6 | -e1 | -1 | -e3 | e2 | e13 | -e12 | e15 | -e14 | e9 | -e8 | e11 | -e10 |
e6 | e6 | e7 | e4 | -e5 | -e2 | e3 | -1 | -e1 | e14 | -e15 | -e12 | e13 | e10 | -e11 | -e8 | e9 |
e7 | e7 | -e6 | e5 | e4 | -e3 | -e2 | e1 | -1 | e15 | e14 | -e13 | -e12 | e11 | e10 | -e9 | -e8 |
e8 | e8 | -e9 | -e10 | -e11 | -e12 | -e13 | -e14 | -e15 | -1 | e1 | e2 | e3 | e4 | e5 | e6 | e7 |
e9 | e9 | e8 | -e11 | e10 | -e13 | e12 | e15 | -e14 | -e1 | -1 | -e3 | e2 | -e5 | e4 | e7 | -e6 |
e10 | e10 | e11 | e8 | -e9 | -e14 | -e15 | e12 | e13 | -e2 | e3 | -1 | -e1 | -e6 | -e7 | e4 | e5 |
e11 | e11 | -e10 | e9 | e8 | -e15 | e14 | -e13 | e12 | -e3 | -e2 | e1 | -1 | -e7 | e6 | -e5 | e4 |
e12 | e12 | e13 | e14 | e15 | e8 | -e9 | -e10 | -e11 | -e4 | e5 | e6 | e7 | -1 | -e1 | -e2 | -e3 |
e13 | e13 | -e12 | e15 | -e14 | e9 | e8 | e11 | -e10 | -e5 | -e4 | e7 | -e6 | e1 | -1 | e3 | -e2 |
e14 | e14 | -e15 | -e12 | e13 | e10 | -e11 | e8 | e9 | -e6 | -e7 | -e4 | e5 | e2 | -e3 | -1 | e1 |
e15 | e15 | e14 | -e13 | -e12 | e11 | e10 | -e9 | e8 | -e7 | e6 | -e5 | -e4 | e3 | e2 | -e1 | -1 |
Data Registers: R00 is unused ( Registers R17 thru R48 are to be initialized before executing "S*S" )
>>>> When the program stops, R01 to R16 = the 16 components of S.S'
• R17 to R32 = the 16 components of the first sedenion S
• R33 to R48 = the 16 components of the second sedenion S'
Flags: /
Subroutines: /
01 LBL "S*S"
02 RCL 17 03 RCL 48 04 * 05 RCL 18 06 RCL 47 07 * 08 + 09 RCL 19 10 RCL 46 11 * 12 - 13 RCL 20 14 RCL 45 15 * 16 - 17 RCL 21 18 RCL 44 19 * 20 + 21 RCL 22 22 RCL 43 23 * 24 + 25 RCL 23 26 RCL 42 27 * 28 - 29 RCL 24 30 RCL 41 31 * 32 + 33 RCL 25 34 RCL 40 35 * 36 - 37 RCL 26 38 RCL 39 39 * 40 + 41 RCL 27 42 RCL 38 43 * 44 - 45 RCL 28 46 RCL 37 47 * 48 - 49 RCL 29 50 RCL 36 51 * 52 + 53 RCL 30 54 RCL 35 55 * 56 + 57 RCL 31 58 RCL 34 59 * 60 - 61 RCL 32 62 RCL 33 63 * 64 + 65 STO 16 66 RCL 17 67 RCL 47 68 * 69 RCL 18 70 RCL 48 71 * 72 - 73 RCL 19 74 RCL 45 75 * 76 - 77 RCL 20 78 RCL 46 79 * 80 + 81 RCL 21 82 RCL 43 83 * 84 + 85 RCL 22 86 RCL 44 87 * 88 - 89 RCL 23 90 RCL 41 91 * 92 + 93 RCL 24 94 RCL 42 95 * 96 + 97 RCL 25 98 RCL 39 99 * 100 - 101 RCL 26 102 RCL 40 103 * 104 - 105 RCL 27 106 RCL 37 107 * 108 - 109 RCL 28 110 RCL 38 111 * 112 + 113 RCL 29 114 RCL 35 115 * 116 + 117 RCL 30 118 RCL 36 119 * 120 - 121 RCL 31 122 RCL 33 123 * 124 + 125 RCL 32 126 RCL 34 127 * 128 + 129 STO 15 130 RCL 17 131 RCL 46 132 * 133 RCL 18 134 RCL 45 135 * 136 - 137 RCL 19 138 RCL 48 139 * 140 + 141 RCL 20 142 RCL 47 143 * 144 - 145 RCL 21 146 RCL 42 147 * 148 + 149 RCL 22 150 RCL 41 151 * 152 + 153 RCL 23 154 RCL 44 155 * 156 + 157 RCL 24 158 RCL 43 159 * 160 - 161 RCL 25 162 RCL 38 163 * 164 - 165 RCL 26 166 RCL 37 167 * 168 - 169 RCL 27 170 RCL 40 171 * 172 + |
173 RCL 28
174 RCL 39 175 * 176 - 177 RCL 29 178 RCL 34 179 * 180 + 181 RCL 30 182 RCL 33 183 * 184 + 185 RCL 31 186 RCL 36 187 * 188 + 189 RCL 32 190 RCL 35 191 * 192 - 193 STO 14 194 RCL 17 195 RCL 45 196 * 197 RCL 18 198 RCL 46 199 * 200 + 201 RCL 19 202 RCL 47 203 * 204 + 205 RCL 20 206 RCL 48 207 * 208 + 209 RCL 21 210 RCL 41 211 * 212 + 213 RCL 22 214 RCL 42 215 * 216 - 217 RCL 23 218 RCL 43 219 * 220 - 221 RCL 24 222 RCL 44 223 * 224 - 225 RCL 25 226 RCL 37 227 * 228 - 229 RCL 26 230 RCL 38 231 * 232 + 233 RCL 27 234 RCL 39 235 * 236 + 237 RCL 28 238 RCL 40 239 * 240 + 241 RCL 29 242 RCL 33 243 * 244 + 245 RCL 30 246 RCL 34 247 * 248 - 249 RCL 31 250 RCL 35 251 * 252 - 253 RCL 32 254 RCL 36 255 * 256 - 257 STO 13 258 RCL 17 259 RCL 44 260 * 261 RCL 18 262 RCL 43 263 * 264 - 265 RCL 19 266 RCL 42 267 * 268 + 269 RCL 20 270 RCL 41 271 * 272 + 273 RCL 21 274 RCL 48 275 * 276 - 277 RCL 22 278 RCL 47 279 * 280 + 281 RCL 23 282 RCL 46 283 * 284 - 285 RCL 24 286 RCL 45 287 * 288 + 289 RCL 25 290 RCL 36 291 * 292 - 293 RCL 26 294 RCL 35 295 * 296 - 297 RCL 27 298 RCL 34 299 * 300 + 301 RCL 28 302 RCL 33 303 * 304 + 305 RCL 29 306 RCL 40 307 * 308 - 309 RCL 30 310 RCL 39 311 * 312 + 313 RCL 31 314 RCL 38 315 * 316 - 317 RCL 32 318 RCL 37 319 * 320 + 321 STO 12 322 RCL 17 323 RCL 43 324 * 325 RCL 18 326 RCL 44 327 * 328 + 329 RCL 19 330 RCL 41 331 * 332 + 333 RCL 20 334 RCL 42 335 * 336 - 337 RCL 21 338 RCL 47 339 * 340 - 341 RCL 22 342 RCL 48 343 * 344 - |
345 RCL 23
346 RCL 45 347 * 348 + 349 RCL 24 350 RCL 46 351 * 352 + 353 RCL 25 354 RCL 35 355 * 356 - 357 RCL 26 358 RCL 36 359 * 360 + 361 RCL 27 362 RCL 33 363 * 364 + 365 RCL 28 366 RCL 34 367 * 368 - 369 RCL 29 370 RCL 39 371 * 372 - 373 RCL 30 374 RCL 40 375 * 376 - 377 RCL 31 378 RCL 37 379 * 380 + 381 RCL 32 382 RCL 38 383 * 384 + 385 STO 11 386 RCL 17 387 RCL 42 388 * 389 RCL 18 390 RCL 41 391 * 392 + 393 RCL 19 394 RCL 44 395 * 396 - 397 RCL 20 398 RCL 43 399 * 400 + 401 RCL 21 402 RCL 46 403 * 404 - 405 RCL 22 406 RCL 45 407 * 408 + 409 RCL 23 410 RCL 48 411 * 412 + 413 RCL 24 414 RCL 47 415 * 416 - 417 RCL 25 418 RCL 34 419 * 420 - 421 RCL 26 422 RCL 33 423 * 424 + 425 RCL 27 426 RCL 36 427 * 428 - 429 RCL 28 430 RCL 35 431 * 432 + 433 RCL 29 434 RCL 38 435 * 436 - 437 RCL 30 438 RCL 37 439 * 440 + 441 RCL 31 442 RCL 40 443 * 444 + 445 RCL 32 446 RCL 39 447 * 448 - 449 STO 10 450 RCL 17 451 RCL 41 452 * 453 RCL 18 454 RCL 42 455 * 456 - 457 RCL 19 458 RCL 43 459 * 460 - 461 RCL 20 462 RCL 44 463 * 464 - 465 RCL 21 466 RCL 45 467 * 468 - 469 RCL 22 470 RCL 46 471 * 472 - 473 RCL 23 474 RCL 47 475 * 476 - 477 RCL 24 478 RCL 48 479 * 480 - 481 RCL 25 482 RCL 33 483 * 484 + 485 RCL 26 486 RCL 34 487 * 488 + 489 RCL 27 490 RCL 35 491 * 492 + 493 RCL 28 494 RCL 36 495 * 496 + 497 RCL 29 498 RCL 37 499 * 500 + 501 RCL 30 502 RCL 38 503 * 504 + 505 RCL 31 506 RCL 39 507 * 508 + 509 RCL 32 510 RCL 40 511 * 512 + 513 STO 09 514 RCL 17 515 RCL 40 516 * |
517 RCL 18
518 RCL 39 519 * 520 - 521 RCL 19 522 RCL 38 523 * 524 + 525 RCL 20 526 RCL 37 527 * 528 + 529 RCL 21 530 RCL 36 531 * 532 - 533 RCL 22 534 RCL 35 535 * 536 - 537 RCL 23 538 RCL 34 539 * 540 + 541 RCL 24 542 RCL 33 543 * 544 + 545 RCL 25 546 RCL 48 547 * 548 + 549 RCL 26 550 RCL 47 551 * 552 + 553 RCL 27 554 RCL 46 555 * 556 - 557 RCL 28 558 RCL 45 559 * 560 - 561 RCL 29 562 RCL 44 563 * 564 + 565 RCL 30 566 RCL 43 567 * 568 + 569 RCL 31 570 RCL 42 571 * 572 - 573 RCL 32 574 RCL 41 575 * 576 - 577 STO 08 578 RCL 17 579 RCL 39 580 * 581 RCL 18 582 RCL 40 583 * 584 + 585 RCL 19 586 RCL 37 587 * 588 + 589 RCL 20 590 RCL 38 591 * 592 - 593 RCL 21 594 RCL 35 595 * 596 - 597 RCL 22 598 RCL 36 599 * 600 + 601 RCL 23 602 RCL 33 603 * 604 + 605 RCL 24 606 RCL 34 607 * 608 - 609 RCL 25 610 RCL 47 611 * 612 + 613 RCL 26 614 RCL 48 615 * 616 - 617 RCL 27 618 RCL 45 619 * 620 - 621 RCL 28 622 RCL 46 623 * 624 + 625 RCL 29 626 RCL 43 627 * 628 + 629 RCL 30 630 RCL 44 631 * 632 - 633 RCL 31 634 RCL 41 635 * 636 - 637 RCL 32 638 RCL 42 639 * 640 + 641 STO 07 642 RCL 17 643 RCL 38 644 * 645 RCL 18 646 RCL 37 647 * 648 + 649 RCL 19 650 RCL 40 651 * 652 - 653 RCL 20 654 RCL 39 655 * 656 + 657 RCL 21 658 RCL 34 659 * 660 - 661 RCL 22 662 RCL 33 663 * 664 + 665 RCL 23 666 RCL 36 667 * 668 - 669 RCL 24 670 RCL 35 671 * 672 + 673 RCL 25 674 RCL 46 675 * 676 + 677 RCL 26 678 RCL 45 679 * 680 - 681 RCL 27 682 RCL 48 683 * 684 + 685 RCL 28 686 RCL 47 687 * 688 - |
689 RCL 29
690 RCL 42 691 * 692 + 693 RCL 30 694 RCL 41 695 * 696 - 697 RCL 31 698 RCL 44 699 * 700 + 701 RCL 32 702 RCL 43 703 * 704 - 705 STO 06 706 RCL 17 707 RCL 37 708 * 709 RCL 18 710 RCL 38 711 * 712 - 713 RCL 19 714 RCL 39 715 * 716 - 717 RCL 20 718 RCL 40 719 * 720 - 721 RCL 21 722 RCL 33 723 * 724 + 725 RCL 22 726 RCL 34 727 * 728 + 729 RCL 23 730 RCL 35 731 * 732 + 733 RCL 24 734 RCL 36 735 * 736 + 737 RCL 25 738 RCL 45 739 * 740 + 741 RCL 26 742 RCL 46 743 * 744 + 745 RCL 27 746 RCL 47 747 * 748 + 749 RCL 28 750 RCL 48 751 * 752 + 753 RCL 29 754 RCL 41 755 * 756 - 757 RCL 30 758 RCL 42 759 * 760 - 761 RCL 31 762 RCL 43 763 * 764 - 765 RCL 32 766 RCL 44 767 * 768 - 769 STO 05 770 RCL 17 771 RCL 34 772 * 773 RCL 18 774 RCL 33 775 * 776 + 777 RCL 19 778 RCL 36 779 * 780 + 781 RCL 20 782 RCL 35 783 * 784 - 785 RCL 21 786 RCL 38 787 * 788 + 789 RCL 22 790 RCL 37 791 * 792 - 793 RCL 23 794 RCL 40 795 * 796 - 797 RCL 24 798 RCL 39 799 * 800 + 801 RCL 25 802 RCL 42 803 * 804 + 805 RCL 26 806 RCL 41 807 * 808 - 809 RCL 27 810 RCL 44 811 * 812 - 813 RCL 28 814 RCL 43 815 * 816 + 817 RCL 29 818 RCL 46 819 * 820 - 821 RCL 30 822 RCL 45 823 * 824 + 825 RCL 31 826 RCL 48 827 * 828 + 829 RCL 32 830 RCL 47 831 * 832 - 833 STO 02 834 RCL 17 835 RCL 33 836 * 837 RCL 18 838 RCL 34 839 * 840 - 841 RCL 19 842 RCL 35 843 * 844 - 845 RCL 20 846 RCL 36 847 * 848 - 849 RCL 21 850 RCL 37 851 * 852 - 853 RCL 22 854 RCL 38 855 * 856 - 857 RCL 23 858 RCL 39 859 * 860 - |
861 RCL 24
862 RCL 40 863 * 864 - 865 RCL 25 866 RCL 41 867 * 868 - 869 RCL 26 870 RCL 42 871 * 872 - 873 RCL 27 874 RCL 43 875 * 876 - 877 RCL 28 878 RCL 44 879 * 880 - 881 RCL 29 882 RCL 45 883 * 884 - 885 RCL 30 886 RCL 46 887 * 888 - 889 RCL 31 890 RCL 47 891 * 892 - 893 RCL 32 894 RCL 48 895 * 896 - 897 STO 01 898 RCL 17 899 RCL 36 900 * 901 RCL 18 902 RCL 35 903 * 904 + 905 RCL 19 906 RCL 34 907 * 908 - 909 RCL 20 910 RCL 33 911 * 912 + 913 RCL 21 914 RCL 40 915 * 916 + 917 RCL 22 918 RCL 39 919 * 920 - 921 RCL 23 922 RCL 38 923 * 924 + 925 RCL 24 926 RCL 37 927 * 928 - 929 RCL 25 930 RCL 44 931 * 932 + 933 RCL 26 934 RCL 43 935 * 936 - 937 RCL 27 938 RCL 42 939 * 940 + 941 RCL 28 942 RCL 41 943 * 944 - 945 RCL 29 946 RCL 48 947 * 948 - 949 RCL 30 950 RCL 47 951 * 952 + 953 RCL 31 954 RCL 46 955 * 956 - 957 RCL 32 958 RCL 45 959 * 960 + 961 STO 04 962 RCL 17 963 RCL 35 964 * 965 RCL 18 966 RCL 36 967 * 968 - 969 RCL 19 970 RCL 33 971 * 972 + 973 RCL 20 974 RCL 34 975 * 976 + 977 RCL 21 978 RCL 39 979 * 980 + 981 RCL 22 982 RCL 40 983 * 984 + 985 RCL 23 986 RCL 37 987 * 988 - 989 RCL 24 990 RCL 38 991 * 992 - 993 RCL 25 994 RCL 43 995 * 996 + 997 RCL 26 998 RCL 44 999 * 1000 + 1001 RCL 27 1002 RCL 41 1003 * 1004 - 1005 RCL 28 1006 RCL 42 1007 * 1008 - 1009 RCL 29 1010 RCL 47 1011 * 1012 - 1013 RCL 30 1014 RCL 48 1015 * 1016 - 1017 RCL 31 1018 RCL 45 1019 * 1020 + 1021 RCL 32 1022 RCL 46 1023 * 1024 + 1025 STO 03 1026 RCL 02 1027 RCL 01 1028 END |
( 1549 bytes / SIZE
049 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 2 + 4 e1 + 9 e2 + 3 e3
+ 5 e4 + 7 e5 + 8 e6 + 2 e7
+ 6 e8 + 4 e9 + 3 e10 + 2 e11
+ 9 e12 + 7 e13 + 6 e14 + 8 e15
S' = 9 + 2 e1 + 4 e2 + 7 e3
+ 3 e4 + 2 e5 + 6 e6 + 5 e7
+ 4 e8 + 2 e9 + 6 e10 + 9 e11
+ 3 e12 + 6 e13 + 5 e14 + 7 e15
2 STO 17
5 STO 21
6 STO 25 9
STO 29
9 STO 33 3 STO 37
4 STO 41 3 STO 45
4 STO 18
7 STO 22
4 STO 26 7
STO 30
2 STO 34 2 STO 38
2 STO 42 6 STO 46
9 STO 19
8 STO 23
3 STO 27 6
STO 31
4 STO 35 6 STO 39
6 STO 43 5 STO 47
3 STO 20
2 STO 24
2 STO 28 8
STO 32
7 STO 36 5 STO 40
9 STO 44 7 STO 48
XEQ "S*S" >>>> -357 =
R01
---Execution time = 31s---
RDN 2 = R02
RDN 132 = R03
RDN 20 = R04
and
R05 = -53 , R06 = 25 , R07 = 138 , R08 = 101 , R09 = 13 , R10 = -10 , R11 = 12 , R12 = -43 , R13 = 41 , R14 = 216 , R15 = -28 , R16 = 183
whence
S.S' = - 357 + 2 e1 + 132 e2
+ 20 e3 - 53 e4 + 25 e5 + 138 e6
+ 101 e7 + 13 e8 - 10 e9 + 12 e10
- 43 e11 + 41 e12 + 216 e13 - 28 e14
+ 183 e15
Notes:
-Registers R17 thru R48 are undisturbed.
-Execution time can reach 36 seconds.
2°) Reciprocal of a Sedenion
-The reciprocal of a sedenion S # 0 is given by
S-1 = S* / | S |2
where S* is the conjugate of S and | S |2
= x02 + x12 + .................
+ x152
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "1/S" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of 1/S which has replaced S
Flags: /
Subroutines: /
01 LBL "1/S"
02 16 03 ENTER^ 04 ENTER^ 05 CLX 06 LBL 00 07 RCL IND Y 08 X^2 09 + 10 DSE Y 11 GTO 00 12 CHS 13 LBL 01 14 ST/ IND Z 15 DSE Z 16 GTO 01 17 RCL 04 18 RCL 03 19 RCL 02 20 RCL 01 21 CHS 22 STO 01 23 END |
( 38 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example: S
= 2 + 4 e1 + 5 e2 + 10 e3 + 3 e4
+ 7 e5 + 6 e6 + 9 e7 + 8 e8
+ 4 e9 + 7 e10 + 3 e11 + 6 e12
+ 7 e13 + 4 e14 + 2 e15
2 STO 01
3 STO 05 8
STO 09 6 STO 13
4 STO 02
7 STO 06 4
STO 10 7 STO 14
5 STO 03
6 STO 07 7
STO 11 4 STO 15
10 STO 04
9 STO 08 3
STO 12 2 STO 16
XEQ "1/S" >>>> 2/563 = R01
---Execution time = 6s---
RDN -4/563 = R02
RDN -5/563 = R03
RDN -10/563 = R04
and R05 = -3/563 , ........................... , R16 = -2/563 ( approximately )
whence 1 / S = ( 2 - 4 e1
- 5 e2 - 10 e3 - 3 e4 - 7 e5
- 6 e6 - 9 e7 - 8 e8 - 4 e9
- 7 e10 - 3 e11 - 6 e12 - 7 e13
- 4 e14 - 2 e15 ) / 563
3°) Exponential of a Sedenion
a)
Program#1
-The exponential of a sedenion S is defined by the series exp
( S ) = 1 + S + S2/2! + S3/3! + ....... + Sn/n!
+ ........
-Though the product is not associative, the power associativity still
holds.
-A much faster method is used in the next paragraph...
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "EXPS" )
• R01 to R16 = the 16 components of the sedenion S
R17 thru R64: temp
>>>> When the program stops, R01 to R16 = the 16 components of exp ( S ) which has replaced S
Flags: /
Subroutine: "S*S" ( cf paragraph 1-b
)
01 LBL "EXPS"
02 17.064 03 CLRGX 04 1.033016 05 REGMOVE 06 SIGN 07 STO 01 08 STO 17 09 STO 49 10 CLX |
11 STO 00
12 LBL 01 13 XEQ "S*S" 14 16 15 STO M 16 ISG 00 17 CLX 18 RCL 00 19 LBL 02 20 ST/ IND Y |
21 DSE Y
22 GTO 02 23 1.017016 24 REGMOVE 25 64 26 0 27 LBL 03 28 RCL IND M 29 RCL IND Z 30 + |
31 STO IND Z
32 LASTX 33 - 34 ABS 35 + 36 DSE Y 37 DSE M 38 GTO 03 39 X#0? 40 GTO 01 |
41 49.001016
42 REGMOVE 43 RCL 04 44 RCL 03 45 RCL 02 46 RCL 01 47 END |
( 108 bytes / SIZE 065 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "EXPS" >>>>
-2.127648871 = R01
RDN 0.650737938 = R02
RDN 0.616488572 = R03
RDN 0.582239207 = R04
and R05 = 0.547989843 ....................................... R16 = 0.171246826
-So, exp S = - 2.127648871 + 0.650737938 e1 +
0.616488572 e2 + 0.582239207 e3
+ 0.547989843 e4 + 0.513740477 e5 + 0.479491112 e6
+ 0.445241747 e7
+ 0.410992382 e8 + 0.376743016 e9 + 0.342493652 e10
+ 0.308244286 e11
+ 0.273994921 e12 + 0.239745556 e13 + 0.205496191
e14 + 0.171246826 e15
Notes:
-This program is of course very slow and it would not give accurate
results in all cases.
-The following variant is much better:
b)
Program#2
-We can also use the following formula to compute exp S
exp( x0 + x1 e1 + .... + x15 e15 ) = ex0 [ cos µ + ( sin µ ).( x1 e1 + .... + x15 e15 ) / µ ]
where µ = ( x12
+ .............. + x152)1/2
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "E^S" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of exp S which has replaced S
Flags: /
Subroutines: /
01 LBL "E^S"
02 16.001 03 DEG 04 0 05 LBL 01 06 RCL IND Y 07 X^2 |
08 +
09 DSE Y 10 GTO 01 11 SQRT 12 ENTER^ 13 R-D 14 RCL 01 |
15 E^X
16 P-R 17 STO 01 18 X<> Z 19 X=0? 20 SIGN 21 / |
22 R^
23 15 24 + 25 X<>Y 26 LBL 02 27 ST* IND Y 28 DSE Y |
29 GTO 02
30 RCL 04 31 RCL 03 32 RCL 02 33 RCL 01 34 END |
( 55 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "E^S" >>>> -2.127648869
= R01
---Execution time = 7s---
RDN 0.650737937 = R02
RDN 0.616488572 = R03
RDN 0.582239207 = R04
and R05 = 0.547989842 ....................................... R16 = 0.171246826
-So, exp S = - 2.127648869 + 0.650737937 e1 +
0.616488572 e2 + 0.582239207 e3
+ 0.547989842 e4 + 0.513740477 e5 + 0.479491112 e6
+ 0.445241747 e7
+ 0.410992381 e8 + 0.376743016 e9 + 0.342493651 e10
+ 0.308244286 e11
+ 0.273994921 e12 + 0.239745556 e13 + 0.205496191
e14 + 0.171246826 e15
-So, we get the same results, with small differences in the last places
due to roundoff-errors.
4°) Logarithm of a Sedenion
-"LNS" uses the formula: Ln( x0 + x1 e1 + ......................... + x15 e15 )
= Ln ( x02 + x12 + ......................... + x152 )1/2 + Atan2(µ,x0). ( x1 e1 + ......................... + x15 e15 ) / µ
where µ = ( x12 + .................... + x152 )1/2
-If µ = 0 , ( x1 e1
+ ......................... + x15 e15 ) / µ
is replaced by e1
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "LNS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Ln S which has replaced S
Flags: /
Subroutines: /
01 LBL "LNS"
02 16.001 03 DEG 04 0 05 LBL 01 06 RCL IND Y 07 X^2 08 + |
09 DSE Y
10 GTO 01 11 SQRT 12 STO Y 13 LASTX 14 RCL 01 15 X^2 16 + |
17 SQRT
18 LN 19 X<> 01 20 R-P 21 RDN 22 D-R 23 X<>Y 24 X#0? |
25 GTO 00
26 SIGN 27 STO 02 28 LBL 00 29 / 30 16.001 31 X<>Y 32 LBL 02 |
33 STO IND Y
34 DSE Y 35 GTO 02 36 RCL 04 37 RCL 03 38 RCL 02 39 RCL 01 40 END |
( 67 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "LNS" >>>>
0.980047392 = R01
---Execution time = 4s---
RDN 0.456219471 = R02
RDN 0.432207920 = R03
RDN 0.408196369 = R04
and R05 = 0.384184818 ................................... R16 = 0.120057756
-So, Ln S = 0.980047392 + 0.456219471 e1
+ 0.432207920 e2 + 0.408196369 e3
+ 0.384184818 e4 + 0.360173267 e5 + 0.336161716 e6
+ 0.312150164 e7
+ 0.288138613 e8 + 0.264127062 e9 + 0.240115511 e10
+ 0.216103960 e11
+ 0.192092409 e12 + 0.168080858 e13 + 0.144069307
e14 + 0.120057756 e15
5°) Raising a Sedenion to a power
a) Real
exponent
"S^R" calculates Sr = exp ( r Ln S )
where r is a real number and S is a sedenion
Data Registers: • R00 = r ( Registers R00 thru R08 are to be initialized before executing "S^R" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Sr which has replaced S
Flags: /
Subroutines: "LNS" & "E^S"
01 LBL "S^R"
02 XEQ "LNS" 03 16 04 RCL 00 05 LBL 00 06 ST* IND Y 07 DSE Y 08 GTO 00 09 XEQ "E^S" 10 END |
( 30 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
r = PI and
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
PI STO 00
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "S^R" >>>> -18.12530584
= R01
---Execution time = 19s---
RDN -4.613643036 = R02
RDN -4.370819717 = R03
RDN -4.127996401 = R04
and R05 = -3.885173082 .................................. R16 = -1.214116589
-So, Sr = -18.12530584 - 4.613643036 e1
- 4.370819717 e2 - 4.127996401 e3
- 3.885173082 e4 - 3.642349766 e5 - 3.399526447 e6
- 3.156703130 e7
- 2.913879812 e8 - 2.671056494 e9 - 2.428233177 e10
- 2.185409859 e11
- 1.942586542 e12 - 1.699763224 e13 - 1.456939907
e14 - 1.214116589 e15
b) Sedenion exponent
"S^S" computes SS' = exp [ ( Ln S ) S'
] where S and S' are 2 sedenions
Data Registers: R00: temp ( Registers R17 thru R48 are to be initialized before executing "S^S" )
>>>> When the program stops, R01 to R16 = the 16 components of SS'
• R17 to R32 = the 16 components of the first sedenion S
• R33 to R48 = the 16 components of the second sedenion S'
Flags: /
Subroutines: "LNS" "S*S" and
"E^S"
01 LBL "S^S"
02 17.001016 03 STO 00 04 REGMOVE 05 XEQ "LNS" 06 RCL 00 07 REGSWAP 08 XEQ "S*S" 09 XEQ "E^S" 10 END |
( 40 bytes / SIZE 049 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 +
0.85 e3 + 0.8 e4 + 0.75 e5
+ 0.7 e6 + 0.65 e7 + 0.6 e8
+ 0.55 e9 + 0.5 e10 + 0.45 e11
+ 0.4 e12 + 0.35 e13 + 0.3 e14
+ 0.25 e15
S' = 0.25 + 0.3 e1 + 0.35 e2
+ 0.4 e3 + 0.45 e4 + 0.5 e5
+ 0.55 e6 + 0.6 e7 + 0.65 e8
+ 0.7 e9 + 0.75 e10 + 0.8 e11
+ 0.85 e12 + 0.9 e13 + 0.95
e14 + e15
1 STO 17
0.8 STO 21
0.6 STO 25
0.4 STO 29
0.25 STO 33 0.45 STO
37 0.65 STO 41 0.85
STO 45
0.95 STO 18
0.75 STO 22
0.55 STO 26 0.35
STO 30
0.3 STO 34 0.5
STO 38 0.7 STO 42
0.9 STO 46
0.9 STO 19
0.7 STO 23
0.5 STO 27
0.3 STO 31
0.35 STO 35 0.55 STO
39 0.75 STO 43 0.95
STO 47
0.85 STO 20
0.65 STO 24
0.45 STO 28 0.25
STO 32
0.4 STO 36 0.6
STO 40 0.8 STO 44
1 STO 48
XEQ "S^S" >>>> -0.102920602 = R01
---Execution time = 53s---
RDN -0.004049497 = R02
RDN -0.004724413 = R03
RDN -0.005399329 = R04
and R05 = -0.006074245 ...................................
R16 = -0.010169002
-So, SS' = -0.102920602 - 0.004049497 e1
- 0.004724413 e2 - 0.005399329 e3
- 0.006074245 e4 - 0.006749161 e5 - 0.007424077 e6
- 0.008098994 e7
+ 0.008982467 e8 - 0.008339052 e9 - 0.007904195 e10
- 0.007469337 e11
- 0.015912668 e12 - 0.008819170 e13 - 0.006164765
e14 - 0.010169002 e15
Notes:
-Another definition is possible: SS' = exp [
S' ( Ln S ) ]
-Simply add .032 + REGSWAP after
line 07
6°) Hyperbolic Functions
a) Sinh
S
-We have: Sinh ( x0 + x1 e1 + ....................... + x15 e15 )
= Sinh x0 Cos µ + ( Cosh x0 ) ( Sin µ ) / µ ( x1 e1 + ....................... + x15 e15 )
where µ = ( x12
+ ....................... + x152 )1/2
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "SHS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Sinh S which has replaced S
Flags: /
Subroutines: /
01 LBL "SHS"
02 16.001 03 DEG 04 0 05 LBL 00 06 RCL IND Y 07 X^2 08 + 09 DSE Y 10 GTO 00 |
11 SQRT
12 STO Y 13 RCL 01 14 E^X-1 15 LASTX 16 CHS 17 E^X-1 18 - 19 X<>Y 20 R-D |
21 1
22 P-R 23 X<>Y 24 X<> Z 25 * 26 X<> 01 27 E^X 28 LASTX 29 CHS 30 E^X |
31 +
32 * 33 2 34 ST/ 01 35 / 36 X<>Y 37 X=0? 38 SIGN 39 / 40 16.001 |
41 X<>Y
42 LBL 02 43 ST* IND Y 44 DSE Y 45 GTO 02 46 RCL 04 47 RCL 03 48 RCL 02 49 RCL 01 50 END |
( 78 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "SHS" >>>> -0.919851454
= R01
---Execution time = 9s---
RDN 0.369402870 = R02
RDN 0.349960614 = R03
RDN 0.330518358 = R04
and R05 = 0.311076101 .................................... R16 = 0.097211282
-Whence, Sinh S = - 0.919851454 + 0.369402870 e1
+ 0.349960614 e2 + 0.330518358 e3
+ 0.311076101 e4 + 0.291633845 e5 + 0.272191589 e6
+ 0.252749332 e7
+ 0.233307076 e8 + 0.213864820 e9 + 0.194422563 e10
+ 0.174980307 e11
+ 0.155538051 e12 + 0.136095794 e13 + 0.116653538
e14 + 0.097211282 e15
Notes:
-Of course, this program may be simplified if you have M-Code routines
SINH & COSH
-Delete lines 33 to 35
-Replace lines 27 to 31 by COSH
-Replace lines 12 to 24 with ENTER^ R-D
1 P-R RCL 01 SINH
b) Cosh
S
-A similar formula gives: Cosh ( x0 + x1 e1 + .......................... + x15 e15 )
= Cosh x0 Cos µ + ( Sinh x0 ) ( Sin µ ) / µ ( x1 e1 + .......................... + x15 e15 )
where µ = ( x12
+ ........................ + x152 )1/2
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "CHS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R08 = the 16 components of Cosh S which has replaced S
Flags: /
Subroutines: /
01 LBL "CHS"
02 16.001 03 DEG 04 0 05 LBL 00 06 RCL IND Y 07 X^2 08 + 09 DSE Y 10 GTO 00 |
11 SQRT
12 STO Y 13 RCL 01 14 E^X 15 LASTX 16 CHS 17 E^X 18 + 19 X<>Y 20 R-D |
21 1
22 P-R 23 X<>Y 24 X<> Z 25 * 26 X<> 01 27 E^X-1 28 LASTX 29 CHS 30 E^X-1 |
31 -
32 * 33 2 34 ST/ 01 35 / 36 X<>Y 37 X=0? 38 SIGN 39 / 40 16.001 |
41 X<>Y
42 LBL 02 43 ST* IND Y 44 DSE Y 45 GTO 02 46 RCL 04 47 RCL 03 48 RCL 02 49 RCL 01 50 END |
( 78 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "CHS" >>>> -1.207797416
= R01
---Execution time = 9s---
RDN 0.281335067 = R02
RDN 0.266527958 = R03
RDN 0.251720850 = R04
and R05 = 0.236913741 .................................... R16 = 0.074035544
-Whence, Cosh S = - 1.207797416 + 0.281335067 e1
+ 0.266527958 e2 + 0.251720850 e3
+ 0.236913741 e4 + 0.222106632 e5 + 0.207299523 e6
+ 0.192492414 e7
+ 0.177685306 e8 + 0.162878197 e9 + 0.148071088 e10
+ 0.133263979 e11
+ 0.118456870 e12 + 0.103649762 e13 + 0.088842653
e14 + 0.074035544 e15
Notes:
-This program may also be simplified if you have M-Code routines
SINH & COSH
-Delete lines 33 to 35
-Replace lines 27 to 31 by SINH
-Replace lines 12 to 24 with ENTER^ R-D
1 P-R RCL 01 COSH
c) Tanh
S
-"THS" calculates Tanh S = ( Sinh S ) ( Cosh S ) -1
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "THS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Tanh S which has replaced S
Flags: /
Subroutines: "CHS" "1/S" "SHS"
"S*S"
01 LBL "THS"
02 1.017016 03 STO 00 04 REGMOVE 05 XEQ "CHS" 06 XEQ "1/S" 07 RCL 00 08 REGSWAP 09 XEQ "SHS" 10 1.017032 11 REGMOVE 12 XEQ "S*S" 13 END |
( 54 bytes / SIZE 049 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "CHS" >>>>
0.909559410 = R01
---Execution time = 56s---
RDN -0.093982576 = R02
RDN -0.089036125 = R03
RDN -0.084089673 = R04
and R05 = -0.079143222 .................................... R16 = -0.024732257
-Whence, Cosh S = 0.909559410 - 0.093982576 e1
- 0.089036125 e2 - 0.084089673 e3
- 0.079143222 e4 - 0.074196771 e5 - 0.069250319 e6
- 0.064303868 e7
- 0.059357417 e8 - 0.054410965 e9 - 0.049464514 e10
- 0.044518062 e11
- 0.039571611 e12 - 0.034625160 e13 - 0.029678708
e14 - 0.024732257 e15
7°) Inverse Hyperbolic Functions
a) ArcSinh
S
Formula:
ArcSinh S = Ln [ S + ( S2 + 1 )1/2 ]
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ASHS" )
• R01 to R16 = the 16 components of the sedenion S R09 thru R24: temp
>>>> When the program stops, R01 to R16 = the 16 components of ArcSinh S which has replaced S
Flags: /
Subroutines: "S^R" "LNS"
01 LBL "ASHS"
02 1.017016 03 REGMOVE 04 2 05 STO 00 06 XEQ "S^R" 07 1 08 ST+ 01 09 RCL 00 10 1/X 11 STO 00 12 XEQ "S^R" 13 16 14 ENTER^ 15 ST+ Y 16 LBL 00 17 RCL IND Y 18 ST+ IND Y 19 RDN 20 DSE Y 21 DSE X 22 GTO 00 23 XEQ "LNS" 24 END |
( 61 bytes / SIZE 033 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ASHS" >>>> 1.647954890
= R01
---Execution time = 51s---
RDN 0.446040403 = R02
RDN 0.422564592 = R03
RDN 0.399088782 = R04
and R05 = 0.375612971 .................................... R16 = 0.117379053
-Whence, Arc Sinh S = 1.647954890 + 0.446040403 e1
+ 0.422564592 e2 + 0.399088782 e3
+ 0.375612971 e4 + 0.352137160 e5 + 0.328661350 e6
+ 0.305185539 e7
+ 0.281709728 e8 + 0.258233918 e9 + 0.234758107 e10
+ 0.211282296 e11
+ 0.187806485 e12 + 0.164330675 e13 + 0.140854864
e14 + 0.117379053 e15
b) ArcCosh
S
Formula:
ArcCosh S = Ln [ S + ( S + 1 )1/2 ( S - 1 )1/2 ]
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ACHS" )
• R01 to R16 = the 16 components of the sedenion S R17 thru R64: temp
>>>> When the program stops, R01 to R16 = the 16 components of ArcCosh S which has replaced S
Flags: /
Subroutines: "S^R" "S*S" "LNS"
01 LBL "ACHS"
02 1.049016 03 REGMOVE 04 SIGN 05 ST+ 01 06 .5 |
07 STO 00
08 XEQ "S^R" 09 1.017016 10 REGMOVE 11 49.001016 12 REGMOVE |
13 SIGN
14 ST- 01 15 XEQ "S^R" 16 1.033016 17 REGMOVE 18 XEQ "S*S" |
19 64
20 16 21 LBL 00 22 RCL IND Y 23 ST+ IND Y 24 RDN |
25 DSE Y
26 DSE X 27 GTO 00 28 XEQ "LNS" 29 END |
( 98 bytes / SIZE 065 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ACHS" >>>> 1.698342332
= R01
---Execution time = 70s---
RDN 0.464968039 = R02
RDN 0.440496037 = R03
RDN 0.416024035 = R04
and R05 = 0.391552033 .................................... R16 = 0.122360010
-Whence, Arc Cosh S = 1.698342332 + 0.464968039 e1
+ 0.440496037 e2 + 0.416024035 e3
+ 0.391552033 e4 + 0.367080031 e5 + 0.342608029 e6
+ 0.318136027 e7
+ 0.293664025 e8 + 0.269192022 e9 + 0.244720021 e10
+ 0.220248018 e11
+ 0.195776016 e12 + 0.171304014 e13 + 0.146832012
e14 + 0.122360010 e15
c) ArcTanh
S
Formula:
ArcTanh S = (1/2) [ Ln ( 1 +S ) - Ln ( 1 - S ) ]
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ATHS" )
• R01 to R16 = the 16 components of the sedenion S R17 thru R32: temp
>>>> When the program stops, R01 to R16 = the 16 components of ArcTanh S which has replaced S
Flags: /
Subroutine: "LNS"
01 LBL "ATHS"
02 1.017016 03 STO 00 04 REGMOVE 05 SIGN 06 ST- 01 07 ST+ 17 08 16 |
09 X<>Y
10 CHS 11 LBL 00 12 ST* IND Y 13 DSE Y 14 GTO 00 15 XEQ "LNS" 16 RCL 00 |
17 REGSWAP
18 XEQ "LNS" 19 32 20 16 21 LBL 01 22 RCL IND X 23 RCL IND Z 24 - |
25 2
26 / 27 STO IND Y 28 RDN 29 DSE Y 30 DSE X 31 GTO 01 32 RCL 04 |
33 RCL 03
34 RCL 02 35 RCL 01 36 END |
( 77 bytes / SIZE 033 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ATHS" >>>> 0.126061663
= R01
---Execution time = 26s---
RDN 0.473288545 = R02
RDN 0.448378622 = R03
RDN 0.423468698 = R04
and R05 = 0.391552033 .................................... R16 = 0.124549617
-Whence, Arc Tanh S = 0.126061663 + 0.473288545 e1
+ 0.448378622 e2 + 0.423468698 e3
+ 0.398558775 e4 + 0.373648851 e5 + 0.348738928 e6
+ 0.323829005 e7
+ 0.298919081 e8 + 0.274009158 e9 + 0.249099234 e10
+ 0.224189311 e11
+ 0.199279387 e12 + 0.174369464 e13 + 0.149459541
e14 + 0.124549617 e15
9°) Trigonometric Functions
a) Sin S
Formula: Sin ( x0 + x1 e1 + ................. + x15 e15 )
= Sin x0 Cosh µ + ( Cos x0 ) ( Sinh µ ) / µ ( x1 e1 + ........................... + x15 e15 )
where µ = ( x12
+ ................... + x152 )1/2
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "SINS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Sin S which has replaced S
Flags: /
Subroutines: /
01 LBL "SINS"
02 16.001 03 DEG 04 0 05 LBL 01 06 RCL IND Y 07 X^2 08 + 09 DSE Y 10 GTO 01 |
11 SQRT
12 RCL 01 13 R-D 14 COS 15 RCL Y 16 E^X-1 17 LASTX 18 CHS 19 E^X-1 20 - |
21 *
22 X<>Y 23 X=0? 24 SIGN 25 ST+ X 26 / 27 16.001 28 X<>Y 29 LBL 02 30 ST* IND Y |
31 DSE Y
32 GTO 02 33 R^ 34 E^X 35 LASTX 36 CHS 37 E^X 38 + 39 RCL 01 40 R-D |
41 SIN
42 * 43 2 44 / 45 STO 01 46 RCL 04 47 RCL 03 48 RCL 02 49 R^ 50 END |
( 77 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "SINS" >>>> 5.008811165
= R01
---Execution time = 9s---
RDN 1.219478777 = R02
RDN 1.155295683 = R03
RDN 1.091112590 = R04
and R05 = 1.026929496 .................................... R16 = 0.320915468
-Whence, Sin S = 5.008811165 + 1.219478777
e1 + 1.155295683 e2 + 1.091112590 e3
+ 1.026929496 e4 + 0.962746403 e5 + 0.898563309 e6
+ 0.834380216 e7
+ 0.770197122 e8 + 0.706014029 e9 + 0.641830935 e10
+ 0.577647842 e11
+ 0.513464748 e12 + 0.449281655 e13 + 0.385098561
e14 + 0.320915468 e15
b) Cos S
Formula: Cos ( x0 + x1 e1 + ........................ + x15 e15 )
= Cos x0 Cosh µ + ( Sin x0 ) ( Sinh µ ) / µ ( x1 e1 + ........................ + x15 e15 )
where µ = ( x12
+ ........................ + x152 )1/2
Data Registers: R00 is unused ( Registers R01 thru R16 are to be initialized before executing "COSS" )
• R01 to R16 = the 16 components of the sedenion S
>>>> When the program stops, R01 to R16 = the 16 components of Cos S which has replaced S
Flags: /
Subroutines: /
01 LBL "COSS"
02 16.001 03 DEG 04 0 05 LBL 01 06 RCL IND Y 07 X^2 08 + 09 DSE Y 10 GTO 01 |
11 SQRT
12 RCL 01 13 R-D 14 COS 15 RCL Y 16 E^X 17 LASTX 18 CHS 19 E^X 20 + |
21 *
22 2 23 / 24 X<> 01 25 R-D 26 SIN 27 X<>Y 28 E^X-1 29 LASTX 30 CHS |
31 E^X-1
32 - 33 * 34 X<>Y 35 X=0? 36 SIGN 37 ST+ X 38 / 39 CHS 40 16.001 |
41 X<>Y
42 LBL 02 43 ST* IND Y 44 DSE Y 45 GTO 02 46 RCL 04 47 RCL 03 48 RCL 02 49 RCL 01 50 END |
( 78 bytes / SIZE 017 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "COSS" >>>> 3.216120664
= R01
---Execution time = 9s---
RDN -1.899225665 = R02
RDN -1.799266420 = R03
RDN -1.699307174 = R04
and R05 = -1.599347929 .................................... R16 = -0.499796228
-Whence, Cos S = 3.216120664 - 1.899225665
e1 - 1.799266420 e2 - 1.699307174 e3
- 1.599347929 e4 - 1.499388683 e5 - 1.399429438 e6
- 1.299470192 e7
- 1.199510947 e8 - 1.099551701 e9 - 0.999592456 e10
- 0.899633210 e11
- 0.799673964 e12 - 0.699714719 e13 - 0.599755473
e14 - 0.499796228 e15
c) Tan S
Formula: Tan S = ( Sin S ) (
Cos S ) -1
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "TANS" )
• R01 to R16 = the 16 components of the sedenion S R17 to R48: temp
>>>> When the program stops, R01 to R16 = the 16 components of Tan S which has replaced S
Flags: /
Subroutines: "SINS" "COSS"
"1/S" "S*S"
01 LBL "TANS"
02 1.017016 03 STO 00 04 REGMOVE 05 XEQ "SINS" 06 RCL 00 07 REGSWAP 08 XEQ "COSS" 09 XEQ "1/S" 10 RCL 00 11 .016 12 + 13 REGMOVE 14 XEQ "S*S" 15 END |
( 55 bytes / SIZE 049 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "TANS" >>>> 0.013093383
= R01
---Execution time = 60s---
RDN 0.386909011 = R02
RDN 0.366545379 = R03
RDN 0.346181747 = R04
and R05 = 0.325818114 .................................... R16 = 0.101818161
-Whence, Tan S = 0.013093383 + 0.386909011
e1 + 0.366545379 e2 + 0.346181747 e3
+ 0.325818114 e4 + 0.305454482 e5 + 0.285090850 e6
+ 0.264727218 e7
+ 0.244363586 e8 + 0.223999954 e9 + 0.203636322 e10
+ 0.183272689 e11
+ 0.162909057 e12 + 0.142545425 e13 + 0.122181793
e14 + 0.101818161 e15
9°) Inverse Trigonometric Functions
a) Arc Sin
S
Formula: If S = x0 + x1 e1 + .................. + x15 e15
Arc Sin S = - I Arc Sinh ( S I )
where I = ( x1 e1
+ ....................... + x15 e15 ) / µ
and µ = ( x12 + .....................
+ x152 )1/2
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ASINS" )
• R01 to R16 = the 16 components of the sedenion S R17 to R49: temp
>>>> When the program stops, R01 to R16 = the 16 components of Arc Sin S which has replaced S
Flags: /
Subroutines: "S*S" "ASHS"
01 LBL ASINS
02 16.001 03 ENTER^ 04 CLX 05 LBL 00 06 RCL IND Y 07 X^2 08 + 09 DSE Y |
10 GTO 00
11 SQRT 12 X=0? 13 SIGN 14 1.017016 15 REGMOVE 16 .016 17 + 18 STO 49 |
19 REGMOVE
20 CLX 21 STO 33 22 48.033 23 RCL Z 24 LBL 01 25 ST/ IND Y 26 DSE Y 27 GTO 01 |
28 XEQ "S*S"
29 XEQ "ASHS" 30 48 31 32.016 32 LBL 02 33 RCL IND Y 34 CHS 35 STO IND Y 36 RDN |
37 DSE Y
38 DSE X 39 GTO 02 40 RCL 49 41 REGMOVE 42 XEQ "S*S" 43 END |
( 111 bytes / SIZE 050 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ASINS" >>>> 0.361968604
= R01
---Execution time = 123s---
RDN 0.653256773 = R02
RDN 0.618874836 = R03
RDN 0.584492901 = R04
and R05 = 0.550110965 .................................... R16 = 0.171909676
-Whence, Arc Sin S = 0.361968604 + 0.653256773 e1
+ 0.618874836 e2 + 0.584492901 e3
+ 0.550110965 e4 + 0.515729030 e5 + 0.481347095 e6
+ 0.446965159 e7
+ 0.412583224 e8 + 0.378201289 e9 + 0.343819354 e10
+ 0.309437418 e11
+ 0.275055483 e12 + 0.240673547 e13 + 0.206291612
e14 + 0.171909676 e15
b) Arc Cos
S
Formula: Arc Cos S = PI/2 - Arc Sin
S
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ACOSS" )
• R01 to R16 = the 16 components of the sedenion S R17 to R49: temp
>>>> When the program stops, R01 to R16 = the 16 components of Arc Cos S which has replaced S
Flags: /
Subroutine: "ASINS"
01 LBL "ACOSS"
02 XEQ "ASINS" 03 16 04 PI 05 2 06 / 07 ST- 01 08 SIGN 09 CHS 10 LBL 00 11 ST* IND Y 12 DSE Y 13 GTO 00 14 RCL 04 15 RCL 03 16 RCL 02 17 RCL 01 18 END |
( 39 bytes / SIZE 050 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ACOSS" >>>> 1.208827723
= R01
---Execution time = 125s---
RDN -0.653256773 = R02
RDN -0.618874836 = R03
RDN -0.584492901 = R04
and R05 = -0.550110965 .................................... R16 = -0.171909676
-Whence, Arc Cos S = 1.208827723 - 0.653256773 e1
- 0.618874836 e2 - 0.584492901 e3
- 0.550110965 e4 - 0.515729030 e5 - 0.481347095 e6
- 0.446965159 e7
- 0.412583224 e8 - 0.378201289 e9 - 0.343819354 e10
- 0.309437418 e11
- 0.275055483 e12 - 0.240673547 e13 - 0.206291612
e14 - 0.171909676 e15
c) Arc Tan
S
Formula: If S = x0 + x1 e1 + ........................... + x15 e15
Arc Tan S = - S Arc Tanh ( S I )
where I = ( x1 e1
+ ............................... + x15 e15 ) / µ
and µ = ( x12 + ......................
+ x152 )1/2
Data Registers: R00: temp ( Registers R01 thru R16 are to be initialized before executing "ATANS" )
• R01 to R16 = the 16 components of the sedenion S R17 to R49: temp
>>>> When the program stops, R01 to R16 = the 16 components of Arc Tan S which has replaced S
Flags: /
Subroutines: "S*S" "ATHS"
01 LBL ATANS
02 16.001 03 ENTER^ 04 CLX 05 LBL 00 06 RCL IND Y 07 X^2 08 + 09 DSE Y |
10 GTO 00
11 SQRT 12 X=0? 13 SIGN 14 1.017016 15 REGMOVE 16 .016 17 + 18 STO 49 |
19 REGMOVE
20 CLX 21 STO 33 22 48.033 23 RCL Z 24 LBL 01 25 ST/ IND Y 26 DSE Y 27 GTO 01 |
28 XEQ "S*S"
29 XEQ "ATHS" 30 48 31 32.016 32 LBL 02 33 RCL IND Y 34 CHS 35 STO IND Y 36 RDN |
37 DSE Y
38 DSE X 39 GTO 02 40 RCL 49 41 REGMOVE 42 XEQ "S*S" 43 END |
( 111 bytes / SIZE 050 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example:
S = 1 + 0.95 e1 + 0.9 e2 + 0.85 e3 + 0.8 e4 + 0.75 e5 + 0.7 e6 + 0.65 e7 + 0.6 e8 + 0.55 e9 + 0.5 e10 + 0.45 e11 + 0.4 e12 + 0.35 e13 + 0.3 e14 + 0.25 e15
1 STO 01
0.8 STO 05
0.6 STO 09
0.4 STO 13
0.95 STO 02
0.75 STO 06
0.55 STO 10 0.35
STO 14
0.9 STO 03
0.7 STO 07
0.5 STO 11
0.3 STO 15
0.85 STO 04
0.65 STO 08
0.45 STO 12 0.25
STO 16
XEQ "ATANS" >>>> 1.412384085
= R01
---Execution time = 98s---
RDN 0.136289503 = R02
RDN 0.129116371 = R03
RDN 0.121943240 = R04
and R05 = 0.114770108 .................................... R16 = 0.035865659
-Whence, Arc Tan S = 1.412384085 + 0.136289503 e1
+ 0.129116371 e2 + 0.121943240 e3
+ 0.114770108 e4 + 0.107596976 e5 + 0.100423844 e6
+ 0.093250712 e7
+ 0.086077581 e8 + 0.078904449 e9 + 0.071731317 e10
+ 0.064558186 e11
+ 0.057385054 e12 + 0.050211922 e13 + 0.043038791
e14 + 0.035865659 e15
Notes:
-The unique difference between "ASINS" & "ATANS" is line 29
-So, you could use a flag to save several bytes...
10°) Sedenionic Equations
-The following program uses the iterative method also used for quaternionic
equations:
-The equation must be rewritten in the form: f (
S ) = S
and if f satisfies a Lipschitz condition
| f(S) - f(S') | < h | S - S' | with h <
1 , provided S and S' are close to a solution,
then the sequence Sn+1 = f ( Sn
) converges to a root.
Data Registers: • R00 = function name ( Registers R00 thru R16 are to be initialized before executing "SEQ" )
• R01 to R16 = the 16 components of the sedenion S R50 to R65 = S , R66 = fname
>>>> When the program stops, R01 to R16 = the 16 components of a solution S
Flags: /
Subroutine: A program that takes the sedenion
S in R01 thru R16 , calculates and stores f ( S )
in R01 thru R16
without disturbing R50 to R66
01 LBL "SEQ"
02 RCL 00 03 STO 66 04 LBL 01 05 VIEW 01 06 1.050016 07 REGMOVE 08 XEQ IND 66 09 65 10 16 11 0 12 LBL 02 13 RCL IND Y 14 ST- IND T 15 CLX 16 RCL IND T 17 ABS 18 + 19 DSE Z 20 DSE Y 21 GTO 02 22 X#0? 23 GTO 01 24 RCL 66 25 STO 00 26 RCL 04 27 RCL 03 28 RCL 02 29 RCL 01 30 END |
( 61 bytes / SIZE 067 )
STACK | INPUTS | OUTPUTS |
T | / | x3 |
Z | / | x2 |
Y | / | x1 |
X | / | x0 |
Example: Find a solution of the
equation
S2 - Ln S + 1 + 0.95 e1
+ 0.9 e2 + 0.85 e3 + 0.8 e4
+ 0.75 e5 + 0.7 e6
+ 0.65 e7 + 0.6 e8 + 0.55 e9
+ 0.5 e10 + 0.45 e11 + 0.4 e12
+ 0.35 e13 + 0.3 e14 + 0.25
e15 = 0
near 1 + e1 + e2 + e3
+ e4 + e5 + e6 + e7 + e8
+ e9 + e10 + e11 + e12 + e13
+ e14 + e15
-First, we re-write this equation:
S = ( Ln S - 1 - 0.95 e1 -
0.9 e2 - 0.85 e3 - 0.8 e4
- 0.75 e5 - 0.7 e6
- 0.65 e7 - 0.6 e8 - 0.55 e9
- 0.5 e10 - 0.45 e11 - 0.4 e12
- 0.35 e13 - 0.3 e14 - 0.25
e15 ) 1/2 = f ( S )
-The short routine "T" hereunder computes f ( S )
01 LBL "T"
02 XEQ "LNS" 03 1 04 ST- 01 05 .95 06 ST- 02 07 .9 08 ST- 03 |
09 .85
10 ST- 04 11 .8 12 ST- 05 13 .75 14 ST- 06 15 .7 16 ST- 07 |
17 .65
18 ST- 08 19 .6 20 ST- 09 21 .55 22 ST- 10 23 .5 24 STO 00 |
25 ST- 11
26 .45 27 ST- 12 28 .4 29 ST- 13 30 .35 31 ST- 14 32 .3 |
33 ST- 15
34 .25 35 ST- 16 36 XEQ "S^R" 37 RTN 38 END |
-Then, "T" ASTO 00
1 STO 01 STO 02 ...................... STO 16
XEQ "SEQ" >>>> the successive approximations of the real part of the solution are displayed, and finally we get:
1.212710721 = R01
RDN -0.525696561 = R02
RDN -0.498028321 = R03
RDN -0.470360081 = R04
and R05 = -0.442691841 , .......................... , R16 = -0.138341200
-Whence:
S = 1.212710721
- 0.525696561 e1 - 0.498028321 e2 - 0.470360081
e3
- 0.442691841 e4 - 0.415023601 e5 - 0.387355361 e6
- 0.359687121 e7
- 0.332018881 e8 - 0.304350641 e9 - 0.276682401 e10
- 0.249014161 e11
- 0.221345920 e12 - 0.193677680 e13 - 0.166009440
e14 - 0.138341200 e15 is a solution
of this equation.
Notes:
-Convergence is very slow.
-If f doesn't satisfy the required Lipschitz condition or if
we choose a bad initial guess, the algorithm may be divergent.
-Rewriting the equation in a proper form is often very difficult.
-Instead of displaying the real parts of the successive approximations,
you could display the difference between 2 successive approximations:
-Add VIEW X after line 18 ( + ) and delete line 05
VIEW 01
-If the algorithm converges, these differences tend to 0.
-The termination criterion X#0? ( line 22 ) may lead to an infinite
loop.
-Line 22 may be replaced by
E-8 ( or
another "small" number )
X<Y?