These are chat archives for symengine/symengine

13th
Nov 2016
Shikhar Jaiswal
@ShikharJ
Nov 13 2016 05:45
@isuruf Is the function (complex_double_get) intended to just extract the doubles out of basic?
Isuru Fernando
@isuruf
Nov 13 2016 06:36
@ShikharJ, yes
Shikhar Jaiswal
@ShikharJ
Nov 13 2016 06:38
@isuruf Right. So should I make the above declaration in complex_double.h and change the function accordingly? Will that do?
Isuru Fernando
@isuruf
Nov 13 2016 06:38
You can make the above declaration in cwrapper.h.
Shikhar Jaiswal
@ShikharJ
Nov 13 2016 07:52
[  1%] Building CXX object symengine/CMakeFiles/symengine.dir/cwrapper.cpp.o
cc1plus: warning: /home/shikhar/symengine/symengine/cotire/symengine_CXX_prefix.hxx.gch: created by a different GCC executable
/home/shikhar/symengine/symengine/cwrapper.cpp: In function ‘CWRAPPER_OUTPUT_TYPE complex_double_get(dcomplex, basic_struct*)’:
/home/shikhar/symengine/symengine/cwrapper.cpp:437:50: warning: parameter ‘d’ set but not used [-Wunused-but-set-parameter]
 CWRAPPER_OUTPUT_TYPE complex_double_get(dcomplex d, basic s)
                                                  ^
@isuruf I am constantly facing this warning, how to deal with this?
Isuru Fernando
@isuruf
Nov 13 2016 08:02
@ShikharJ, why is dcomplex an input? It should be an output
Shikhar Jaiswal
@ShikharJ
Nov 13 2016 08:04
For assigning purposes, in case more than one object of type dcomplex is required at once.
Isuru Fernando
@isuruf
Nov 13 2016 08:06
Then it should be a pointer to a dcomplex.
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 16:43
How exactly should it be used? When should an environment variable be set? In an init function?
(because won't an environment variable do some weird things when considering pre-compilation?)
Isuru Fernando
@isuruf
Nov 13 2016 16:44
At pre-compilation time is fine.
If SymEngine.jl's build is fixed then say ParameterizedFunctions.jl will also be updated
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 16:45
okay
Isuru Fernando
@isuruf
Nov 13 2016 16:45
Checked with ParameterizedFunctions.jl
Adding it just before using SymEngine worked
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 16:45
okay
Isuru Fernando
@isuruf
Nov 13 2016 16:46
yes
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 16:46
okay cool
I'll have my minor tag without it just in case.
But thanks! My tests on AppVeyor seem to pass now
so it tends to build correctly even on Windows
but it's good to have this as a backup
Nice work on SymEngine, it's a great package!
Isuru Fernando
@isuruf
Nov 13 2016 16:48
I'd be interested in any Appveyor failures even though this would make ParameterizedFunctions work
I'm glad that you find it useful
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 16:52
Well ParameterizedFunctions.jl will still need SymEngine to build in order for its own tests to pass (but that's not true for dependents, since it's the only one which tests the symbolic solutions directly), so I'll let you know if this comes up again.
Isuru Fernando
@isuruf
Nov 13 2016 16:53
+1
It looks like that caused problems on v0.6
only on Windows
Isuru Fernando
@isuruf
Nov 13 2016 17:22
I don't understand the error. Is it when ParameterizedFunctions.jl is being compiled?
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 17:23
yeah
well it actually has precompilation off
Isuru Fernando
@isuruf
Nov 13 2016 17:27
in ode_def_opts, symbolize is not within a try catch block right ?
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 17:29
oh I guess I missed one part
Christopher Rackauckas
@ChrisRackauckas
Nov 13 2016 17:45
Yup that fixed it :smile:
Vishu Sidana
@vishusidana95
Nov 13 2016 21:28
RCP<const Basic> erf(const RCP<const Basic> &arg)
{
    if (is_a<Integer>(*arg)
        and rcp_static_cast<const Integer>(arg)->is_zero()) {
        return zero;
    }
    if (could_extract_minus(*arg)) {
        return neg(erf(neg(arg)));
    }
    return make_rcp<Erf>(arg);
}
@isuruf how we are computing error function.
Error function does require integration?