No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

normalize_exponentiation.b93 1.3KB

1234567891011121314151617181920212223242526272829303132
  1. v######
  2. vp04+g04 < vp06<
  3. #>1-#v\#/ #2<^ <:
  4. v<| :\<***"@}}"g01<>$ ^
  5. > "{pA"**7+ ".^OD"**\- 20p10p01>:2*10g`| |> . @@@
  6. >$30p0:4v^\+1\*2 <v<
  7. 5>v p05p0< >>$40#+v
  8. 0#>030g"}}@"**`!|^ $< *g
  9. g|!`g03***"@}}"2<p < :g2
  10. +>1+30g:*"}}@"**/30^ $00
  11. >50p30g2/30p20g50g>:!|6g
  12. > #2/#\\#-^#1<^<
  13. #$watch[1,0]:int = ibase
  14. #$watch[2,0]:int = iexpo
  15. #$watch[3,0]:int = y
  16. #$watch[4,0]:int = exporp
  17. #$watch[5,0]:int = msum
  18. #$watch[6,0]:int = n
  19. Normalize exponent to base2 :: base , exponent --> norm(b, e)
  20. (stack, stack) --> (stack)
  21. Recieves an exponentiation `base^exponent` an returns an approximation
  22. for the corresponding base-2 exponentiation `2 ^ norm(b,e)`
  23. \see Euler-Problem-099 for C# implementation and more informations
  24. We use a fixed-point factor of 1,000,000 here