News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Riemann Zeta Function

Started by six_L, May 09, 2025, 11:06:09 PM

Previous topic - Next topic

six_L

The Zeta(z) Nontrivial Zero looks like this(Attachment).
Say you, Say me, Say the codes together for ever.

TimoVJL

And what was code for it ?

Long time ago i asked form mathematician, can he show me a mathematical functions for best woman breasts and butts.
I have seen many functions for those and some of them are really good.

For woman breast some GDI functions are very good simulating  those things, but sadly those sources aren't availble right now.
May the source be with you

zedd

Quote from: TimoVJL on May 15, 2025, 12:59:26 AMAnd what was code for it ?
I'll ask an even better question...
"Where is the assembly code for any of it?", even if it is only uasm compatible and not specifically masm compatible (given the board that it is in).

Enquiring minds want to know...  :badgrin:
:biggrin:  :skrewy:

six_L

For me, it's just despatching my interesting time when I have excess energy.

But the question of finding prime is very mysterious.
I guess:
Every Riemann Zeta(z) Nontrivial Zero corresponds to a prime number.
Zeta(0.5+bi) = 0
f(0.5+bi) = p
The larget known maxiprime today is 2^136279841-1. If someone finds the function, we'll find the next maxiprime to be easy.

QuoteLong time ago i asked form mathematician, can he show me a mathematical functions for best woman breasts and butts.
I have seen many functions for those and some of them are really good.

For woman breast some GDI functions are very good simulating  those things, but sadly those sources aren't availble right now.
This is a best APP, ought to continue.
Say you, Say me, Say the codes together for ever.

TimoVJL

I was interest, how Complex numbers are handled in pure masm.

Complex numbers are part of C since C99, not supported by Pelles C anymore.
May the source be with you

FORTRANS

Hi,

Quote from: TimoVJL on May 15, 2025, 07:33:29 PMI was interest, how Complex numbers are handled in pure masm.

   I do not think there is any direct support for complex, or imaginary,
arithmetic in MASM.  You would have to implement such actions as macros
or a set of functions.  So you would handle complex numbers with your
own code.

   Of course, someone has probably done this already, and you could use
their implementation.

Regards,

Steve N.

daydreamer

Quote from: TimoVJL on May 15, 2025, 12:59:26 AMAnd what was code for it ?

Long time ago i asked form mathematician, can he show me a mathematical functions for best woman breasts and butts.
I have seen many functions for those and some of them are really good.

For woman breast some GDI functions are very good simulating  those things, but sadly those sources aren't availble right now.

Seen on TV show a woman named "fern",but there is also exist code for draw a fern plant
Might be possible with combine several curves used for creating meshes
I only have managed to created sphere with trigo curves: 1700 half circles drawing a planet,also made an egg shape

Hourglass body = vertical cosine
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TimoVJL

In C11 specs _Complex data type is just optional.
So many C programmers are now in same position as asm programmers.

@daydreamer, jokes needs their own topic and this is UAsm topic and i was asking masm way to handle complex numbers.
May the source be with you

daydreamer

Quote from: TimoVJL on May 16, 2025, 09:41:30 PMIn C11 specs _Complex data type is just optional.
So many C programmers are now in same position as asm programmers.

@daydreamer, jokes needs their own topic and this is UAsm topic and i was asking masm way to handle complex numbers.
I think math expert raymond might have something in his math library ???
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

six_L

QuoteI was interest, how Complex numbers are handled in pure masm.
for example:
FpuPow proc @Fx:QWORD,@Fy:QWORD
;return: ST(0)=x^y
;x^y =2^[y*log2(x)], x > 0

finit

mov rax,@Fy
fld tbyte ptr[rax] ;y
mov rax,@Fx
fld tbyte ptr[rax] ;x,x11=x11^y
fyl2x ;y*log2(x)
;ST(0)=y*log2(x), ST(1)=zzz
fld  st ;make a second copy
;ST(0)=y*log2(x), ST(1)=y*log2(x), ST(2)=zzz
frndint ;round it to an integer
;ST(0)=int[y*log2(x)], ST(1)=y*log2(x), ST(2)=zzz
fsub st(1),st ;this will leave only a fractional portion in ST(1)
;ST(0)=int[y*log2(x)], ST(1)=y*log2(x)-int[y*log2(x)], ST(2)=zzz
fxch st(1) ;ST(0)=y*log2(x)-int[y*log2(x)], ST(1)=int[y*log2(x)], ST(2)=zzz
f2xm1 ;get the fractional power of 2 (minus 1)
;ST(0)=2ST(0)-1, ST(1)=int[y*log2(x)], ST(2)=zzz
fld1 ;ST(0)=1, ST(1)=2ST(0)-1, ST(2)=int[y*log2(x)], ST(3)=zzz
fadd ;add the 1 to ST(1) and POP ST(0)
;ST(0)=2ST(0), ST(1)=int[y*log2(x)], ST(2)=zzz
fscale ;add the integer in ST(1) to the exponent of ST(0)
;effectively multiplying the content of ST(0) by 2int
;and yielding the final result of x^y
;ST(0)=x^y, ST(1)=int[y*log2(x)], ST(2)=zzz
fstp st(1) ;the content of ST(1) has become useless
;overwrite the content of ST(1) with the result and POP ST(0)
;ST(0)=x^y, ST(1)=zzz
ret

FpuPow endp
;¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
EComplexNumberPow proc @inRealPart:QWORD,@inImaginaryPart:QWORD,@OutRealPart:QWORD,@OutImaginaryPart:QWORD
LOCAL @e:REAL10

; e^(a+bi)
; i = (-1)^0.5
; e^(a+bi) = e^a * e^[b*ln(e)i] = e^a * [cos(b.ln(e))] + e^a * [sin(b.ln(e))]i
; = e^a * [cos(b)] + e^a * [sin(b)]i

finit
; e^a
fld FP10(2.7182818284590452)
fstp @e
invoke FpuPow, addr @e, @inRealPart ; e^a

mov rax,@inImaginaryPart
fld tbyte ptr [rax] ; b
fsincos ; st0=cos(b),st1=sin(b)
fmul st(0),st(2) ; e^a * cos(b)
mov rax,@OutRealPart
fstp tbyte ptr [rax] ; @OutRealPart = e^a * cos(b)

fmul st(0),st(1) ; e^a * sin(b)
mov rax,@OutImaginaryPart
fstp tbyte ptr [rax] ; @OutImaginaryPart = e^a * sin(b)
ffree st(0)

ret
EComplexNumberPow endp
LOCAL ao:REAL10
LOCAL bo:REAL10
LOCAL a:REAL10
LOCAL b:REAL10


fld FP10(0.3)
fstp a
fld FP10(0.4)
fstp b
; e^(0.3+0.4i)
invoke EComplexNumberPow,addr a,addr b,addr ao,addr bo
; Print
; ( 1.243302295069503) + ( 0.525659779196979)i
; ao = 1.243302295069503
; bo = 0.525659779196979
Say you, Say me, Say the codes together for ever.

jack

Hi six_L
if you need some reference code here's a reasonably complete set of functions complex Riemann Zeta

TimoVJL

Thanks six_L  :thumbsup:
I used it for test code for poasm.exe V13
May the source be with you

six_L

Hi,jack
Thanks you.
    '  f(k)=(k+nc)^-n

    '  inf           nc              inf                        inf
    '  ====          ====           /                          ==== B
    '  \       1     \       1      [                          \    (2*k)   (2*k-1)
    '   >    ----- =  >    ----- +  I    f(k) dk + B * f(0) -   >   ------ f  (0)
    '  /      n      /      n       ]               1          /    (2*k)!
    '  ====  k       ====  k       /                           ====
    '  k = 1         k = 1          0                          k = 1

I don't understand your Zeta formula. Do you have some detailed documentations about the formula?
Say you, Say me, Say the codes together for ever.