Browse Source

Added normalize_exponentiation.b93

Mike Schwörer 2 years ago
parent
commit
624a374312
Signed by: Mike Schwörer <mailport@mikescher.de> GPG Key ID: D3C7172E0A70F8CF
1 changed files with 32 additions and 0 deletions
  1. 32
    0
      normalize_exponentiation.b93

+ 32
- 0
normalize_exponentiation.b93 View File

@@ -0,0 +1,32 @@
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
+
14
+
15
+
16
+#$watch[1,0]:int = ibase
17
+#$watch[2,0]:int = iexpo
18
+#$watch[3,0]:int = y
19
+#$watch[4,0]:int = exporp
20
+#$watch[5,0]:int = msum
21
+#$watch[6,0]:int = n
22
+
23
+
24
+Normalize exponent to base2   ::     base , exponent -->  norm(b, e)
25
+                                    (stack, stack)   -->  (stack)
26
+
27
+
28
+Recieves an exponentiation `base^exponent` an returns an approximation 
29
+for the corresponding base-2 exponentiation `2 ^ norm(b,e)`
30
+\see Euler-Problem-099 for C# implementation and more informations
31
+
32
+We use a fixed-point factor of 1,000,000 here

Loading…
Cancel
Save