
Hello Francesco,
Im total beginner. I read some books and online pages.
I do not know, how to apply your rows if Im looking eg. digit on position
177486336 of the number string
Sorry for asking so straightforward
Sergej
---------- Původní e-mail ----------
Od: Francesco Ariis
Hello, Im looking for setting up a solver for the determination of digit on N-th position of the high value number
The trick is to only take the appropriate reminder instead of the whole multiplication result. Something like: λ> myMult x y = rem (x * y) 100 λ> :t +d foldr1 foldr1 :: (a -> a -> a) -> [a] -> a λ> myPower x y = foldr1 myMult (replicate y x) λ> myPower 9 9 89 λ> 9^9 387420489 λ> myPower 9 (myPower 9 9) 89 Does this help? -F _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners "