help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loop containing x/0 gives LLVM error (with jit)


From: Muhali
Subject: Re: loop containing x/0 gives LLVM error (with jit)
Date: Fri, 3 Aug 2012 13:00:34 -0700 (PDT)

actually, it may be a little bit more involved. Using the function gord
(attached, taken from gauss2lats.m) I get the same LLVM error message for

gord(2, 0.7)

although there is no division by 0. Moreover, inserting the line

b*(fn+fn-a)

before the division, I get

octave: jit-typeinfo.cc:505: llvm::Value*
jit_function::call(llvm::IRBuilderD&, const std::vector<jit_value*>&) const:
Assertion `in_args.size () == args.size ()' failed.
Aborted

Strange.

M.

-----------------
function [ggg]=gord(n,x)

% determine the colatitude
colat=acos(x);

c1=sqrt(2.0);

for i=1:n
    c1=c1*sqrt(1.0-1.0/(4*i*i));
end

fn=n;
ang=fn*colat;
s1=0.0;
c4=1.0;
a=-1.0;
b=0.0;

for k=0:2:n
    if k==n 
        c4=0.5*c4;
    end
    s1=s1+c4*cos(ang);
    a=a+2.0;
    b=b+1.0;
    fk=k;
    ang=colat*(fn-fk-2.0);
    c4=(a*(fn-b+1.0)/(b*(fn+fn-a)))*c4;
end
ggg=s1*c1;
end




--
View this message in context: 
http://octave.1599824.n4.nabble.com/loop-containing-x-0-gives-LLVM-error-with-jit-tp4632112p4632123.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]