C++ and root

ion_cut[jj][ch][sl]=A * (exp(-p1mat2g[jj][ch][sl])-exp(-p2mat2g[jj][ch][sl]));

when i run this in my c++/root program i receive a segmentation violation:
This is run in a loop of jj( 0 to 175)ch(0 16)sl(0 4);
and its done for 100.000 events.

There was a crash.
This is the entire stack trace of all threads:

stat_loc=0x7fff5ba88adc, options=<value optimized out>)
at ../sysdeps/unix/sysv/linux/waitpid.c:32

#0 0x00007f92128b936e in __libc_waitpid (pid=,
stat_loc=0x7fff5ba88adc, options=)
at …/sysdeps/unix/sysv/linux/waitpid.c:32
#1 0x00007f9212857299 in do_system (line=)
at …/sysdeps/posix/system.c:149
#2 0x00007f9216f66708 in TUnixSystem::StackTrace() ()
from /home/bfgk/root/lib/libCore.so
#3 0x00007f9216f651d3 in TUnixSystem::DispatchSignals(ESignals) ()
from /home/bfgk/root/lib/libCore.so
#4
#5 0x0000000000409322 in main ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#5 0x0000000000409322 in main ()

solved , the problem was the declaration float instead int;