public static double Round(double Rval, int Rpl) {
double power = Math.pow(10,Rpl);
Rval = Rval * power;
double tmp = new BigDecimal(Rval).setScale(0, BigDecimal.ROUND_HALF_UP).doubleValue();
return (double)tmp/power;
}
Tuesday 9 August 2011
Subscribe to:
Posts (Atom)
Azure OpenAI Architecture Patterns & Deployment Patterns
Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...
-
float p_size = 0.1; default { state_entry() { llSay(0, "Hello, Avatar!"); llSetPrimitiveParams( [ PRIM_...
-
Oracle does not have these functions, however you can use oracle regular expressions to achive this: 1. Example 1: SELECT * FROM _TAB...
-
Setting up a MPI cluster on Ubuntu involves the following steps: 1. Install OpenMPI on all machines. $sudo apt-get install libopenmpi-de...