bug

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bug

Tadayoshi FURUYA

The below is my program.

 

If I use px=mod(ii,a) instead px=ii-fix(ii/a)*a;

 

Error occurred

 

I think this is some bugs.

 

Yours Ted Furuya

 

 

for a=1:100;

  for ii=a+1:500;

    px=ii-fix(ii/a)*a;

    p2=fix(ii/a);

    p3=mod(3*a,ii);

    if ii<a*3&&px==7&&p2==1&&p3==5,qx=a+ii;endif

  endfor

endfor

qx



Reply | Threaded
Open this post in threaded view
|

RE: bug

Tony Richardson
> Sent: Wednesday, January 29, 2020 10:37 PM
> To: [hidden email]
> Subject: bug
>
> The below is my program.
>
> If I use px=mod(ii,a) instead px=ii-fix(ii/a)*a;
>
> Error occurred
>
> I think this is some bugs.
>
> Yours Ted Furuya
>
> for a=1:100;
>  for ii=a+1:500;
>    px=ii-fix(ii/a)*a;
>    p2=fix(ii/a);
>    p3=mod(3*a,ii);
>    if ii<a*3&&px==7&&p2==1&&p3==5,qx=a+ii;endif
>  endfor
> endfor
> qx

In Octave version 5.1.0 on Windows 10, I get the same output with either line.

Tony Richardson



Reply | Threaded
Open this post in threaded view
|

Re: bug

Doug Stewart-4


On Thu, Jan 30, 2020 at 7:59 AM Richardson, Anthony <[hidden email]> wrote:
> Sent: Wednesday, January 29, 2020 10:37 PM
> To: [hidden email]
> Subject: bug
>
> The below is my program.
>
> If I use px=mod(ii,a) instead px=ii-fix(ii/a)*a;
>
> Error occurred
>
> I think this is some bugs.
>
> Yours Ted Furuya
>
> for a=1:100;
>  for ii=a+1:500;
>    px=ii-fix(ii/a)*a;
>    p2=fix(ii/a);
>    p3=mod(3*a,ii);
>    if ii<a*3&&px==7&&p2==1&&p3==5,qx=a+ii;endif
>  endfor
> endfor
> qx

In Octave version 5.1.0 on Windows 10, I get the same output with either line.

Tony Richardson




It also works both ways in Octave 5.1.9 in Ubuntu.


--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: bug

nrjank
In reply to this post by Tadayoshi FURUYA


On Thu, Jan 30, 2020, 4:45 AM Tadayoshi FURUYA <[hidden email]> wrote:

If I use px=mod(ii,a) instead px=ii-fix(ii/a)*a;

Error occurred

I think this is some bugs.


Since other people are not seeing the same errors you are, can you tell us what the actual error is that you get? Otherwise there's not much we can do to help


Reply | Threaded
Open this post in threaded view
|

Re: bug

Maynard Wright-3
In reply to this post by Doug Stewart-4


On 1/30/20 5:04 AM, Doug Stewart wrote:


On Thu, Jan 30, 2020 at 7:59 AM Richardson, Anthony <[hidden email]> wrote:
> Sent: Wednesday, January 29, 2020 10:37 PM
> To: [hidden email]
> Subject: bug
>
> The below is my program.
>
> If I use px=mod(ii,a) instead px=ii-fix(ii/a)*a;
>
> Error occurred
>
> I think this is some bugs.
>
> Yours Ted Furuya
>
> for a=1:100;
>  for ii=a+1:500;
>    px=ii-fix(ii/a)*a;
>    p2=fix(ii/a);
>    p3=mod(3*a,ii);
>    if ii<a*3&&px==7&&p2==1&&p3==5,qx=a+ii;endif
>  endfor
> endfor
> qx

In Octave version 5.1.0 on Windows 10, I get the same output with either line.

Tony Richardson




It also works both ways in Octave 5.1.9 in Ubuntu.



--
DASCertificate for 206392


Just to verify with an older version, it works either way using octave 4.2.2 under Kubuntu 18.04.

Maynard Wright