<jupyter_start><jupyter_text>Trying half life calculations in java<jupyter_code>class Drug{
    float amount;
    int halfLife;
    
    Drug(){
        amount = 0;
        halfLife = 0;
    }
    
    Drug(float amt, int hL ){
        amount = amt;
        halfLife = hL;
    }
    
    public static double finC(Drug dd,int t){
        double k = Math.log(2)/dd.halfLife;
        double fin = dd.amount*Math.exp(-1*k*t);
        return fin;
    }
   
}



Drug Ibu = new Drug(80, 8);



System.out.println(Ibu.finC(Ibu,8));<jupyter_output>40.0
{'fraction_non_alphanumeric': 0.12293577981651377, 'fraction_numerical': 0.02018348623853211, 'mean_word_length': 2.0502793296089385, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '606532', 'license': 'MIT', 'n_tokens_mistral': 218, 'n_tokens_neox': 208, 'n_words': 44, 'path': 'Untitled.ipynb', 'repo_name': 'knaik94/DrugTracker', 'size': '545'}